File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2908,6 +2908,9 @@ def check(funcs, it):
29082908 check ([iter_next ] + [iter_reduce ] * 10 , iter (ba )) # for tsan
29092909 check ([iter_next ] + [iter_setstate ] * 10 , iter (ba )) # for tsan
29102910
2911+ @unittest .skipUnless (support .Py_GIL_DISABLED , 'this test can only possibly fail with GIL disabled' )
2912+ @threading_helper .reap_threads
2913+ @threading_helper .requires_working_threading ()
29112914 def test_free_threading_bytearray_resize (self ):
29122915 def resize_stress (ba ):
29132916 for _ in range (100_000 ):
@@ -2919,8 +2922,8 @@ def resize_stress(ba):
29192922
29202923 ba = bytearray (100 )
29212924 threads = [threading .Thread (target = resize_stress , args = (ba ,)) for _ in range (4 )]
2922- for t in threads : t . start ()
2923- for t in threads : t . join ()
2925+ with threading_helper . start_threads ( threads ):
2926+ pass
29242927
29252928if __name__ == "__main__" :
29262929 unittest .main ()
You can’t perform that action at this time.
0 commit comments