File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -475,16 +475,22 @@ def test_create_many_sequential(self):
475475 for _ in range (100 ):
476476 interp = interpreters .create ()
477477 alive .append (interp )
478+ del alive
479+ support .gc_collect ()
478480
479481 @support .requires_resource ('cpu' )
480482 def test_create_many_threaded (self ):
481483 alive = []
484+ start = threading .Event ()
482485 def task ():
486+ start .wait (10 )
483487 interp = interpreters .create ()
484488 alive .append (interp )
485- threads = ( threading .Thread (target = task ) for _ in range (200 ))
489+ threads = [ threading .Thread (target = task ) for _ in range (200 )]
486490 with threading_helper .start_threads (threads ):
487- pass
491+ start .set ()
492+ del alive
493+ support .gc_collect ()
488494
489495
490496class TestIsShareable (TestBase ):
You can’t perform that action at this time.
0 commit comments