File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -6844,21 +6844,21 @@ def f(x): return x*x
68446844 self .assertEqual ("332833500" , out .decode ('utf-8' ).strip ())
68456845 self .assertFalse (err , msg = err .decode ('utf-8' ))
68466846
6847- @ support . requires_fork ()
6848- def test_forked_not_started ( self ):
6849- # gh-134381
6850- # Ensure that a forked parent process, which has not been started yet,
6851- # can be initiated within the child process.
6852-
6853- ctx = multiprocessing . get_context ( "fork" ) # local “fork” cont
6854- q = ctx .Queue ()
6847+ def test_forked_thread_not_started ( self ):
6848+ # gh-134381: Ensure that a thread that has not been started yet in
6849+ # the parent process can be started within a forked child process.
6850+
6851+ if multiprocessing . get_start_method () != "fork" :
6852+ self . skipTest ( "fork specific test" )
6853+
6854+ q = multiprocessing .Queue ()
68556855 t = threading .Thread (target = lambda : q .put ("done" ), daemon = True )
68566856
68576857 def child ():
68586858 t .start ()
68596859 t .join ()
68606860
6861- p = ctx .Process (target = child )
6861+ p = multiprocessing .Process (target = child )
68626862 p .start ()
68636863 p .join (support .SHORT_TIMEOUT )
68646864
You can’t perform that action at this time.
0 commit comments