We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bf52ecf commit 498222bCopy full SHA for 498222b
Lib/test/test_gc.py
@@ -1249,6 +1249,18 @@ def test_tuple_untrack_counts(self):
1249
self.assertTrue(new_count - count > (n // 2))
1250
1251
1252
+ @threading_helper.requires_working_threading()
1253
+ def test_concurrent_freeze_unfreeze():
1254
+ # GH-142975: On the free-threaded build, this would cause problems
1255
+ # with objects that had a per-thread reference count.
1256
+ def weird():
1257
+ gc.freeze()
1258
+ gc.collect()
1259
+ gc.unfreeze()
1260
+
1261
+ threading_helper.run_concurrently(weird, 4)
1262
1263
1264
class IncrementalGCTests(unittest.TestCase):
1265
@unittest.skipIf(_testinternalcapi is None, "requires _testinternalcapi")
1266
@requires_gil_enabled("Free threading does not support incremental GC")
0 commit comments