File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -477,6 +477,7 @@ def g456():
477
477
@threading_helper .reap_threads
478
478
@threading_helper .requires_working_threading ()
479
479
@support .requires_fork ()
480
+ @support .requires_resource ('cpu' )
480
481
def test_current_frames_exceptions_deadlock (self ):
481
482
"""
482
483
Reproduce the bug raised in GH-106883 and GH-116969.
@@ -515,19 +516,14 @@ def thread_function(num_objects):
515
516
516
517
# The number of objects should be big enough to increase the
517
518
# chances to call the GC.
518
- NUM_OBJECTS = 1000
519
- NUM_THREADS = 10
520
-
521
- # 40 seconds should be enough for the test to be executed: if it
522
- # is more than 40 seconds it means that the process is in deadlock
523
- # hence the test fails
524
- TIMEOUT = 40
519
+ NUM_OBJECTS = 100
520
+ NUM_THREADS = 2
525
521
526
522
# Test the sys._current_frames and sys._current_exceptions calls
527
523
pid = os .fork ()
528
524
if pid : # parent process
529
525
try :
530
- support .wait_process (pid , exitcode = 0 , timeout = TIMEOUT )
526
+ support .wait_process (pid , exitcode = 0 , timeout = support . SHORT_TIMEOUT )
531
527
except KeyboardInterrupt :
532
528
# When pressing CTRL-C kill the deadlocked process
533
529
os .kill (pid , signal .SIGTERM )
You can’t perform that action at this time.
0 commit comments