File tree 1 file changed +3
-6
lines changed
1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -511,7 +511,7 @@ def test_current_exceptions(self):
511
511
# Spawn a thread that blocks at a known place. Then the main
512
512
# thread does sys._current_frames(), and verifies that the frames
513
513
# returned make sense.
514
- entered_g = threading .Event ()
514
+ g_raised = threading .Event ()
515
515
leave_g = threading .Event ()
516
516
thread_info = [] # the thread's id
517
517
@@ -520,22 +520,19 @@ def f123():
520
520
521
521
def g456 ():
522
522
thread_info .append (threading .get_ident ())
523
- entered_g .set ()
524
523
while True :
525
524
try :
526
525
raise ValueError ("oops" )
527
526
except ValueError :
527
+ g_raised .set ()
528
528
if leave_g .wait (timeout = support .LONG_TIMEOUT ):
529
529
break
530
530
531
531
t = threading .Thread (target = f123 )
532
532
t .start ()
533
- entered_g .wait ()
533
+ g_raised .wait (timeout = support . LONG_TIMEOUT )
534
534
535
535
try :
536
- # At this point, t has finished its entered_g.set(), although it's
537
- # impossible to guess whether it's still on that line or has moved on
538
- # to its leave_g.wait().
539
536
self .assertEqual (len (thread_info ), 1 )
540
537
thread_id = thread_info [0 ]
541
538
You can’t perform that action at this time.
0 commit comments