File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -562,7 +562,8 @@ def g456():
562
562
# And the next record must be for g456().
563
563
filename , lineno , funcname , sourceline = stack [i + 1 ]
564
564
self .assertEqual (funcname , "g456" )
565
- self .assertTrue (sourceline .startswith ("if leave_g.wait(" ))
565
+ self .assertTrue ((sourceline .startswith ("if leave_g.wait(" ) or
566
+ sourceline .startswith ("g_raised.set()" )))
566
567
finally :
567
568
# Reap the spawned thread.
568
569
leave_g .set ()
Original file line number Diff line number Diff line change @@ -2418,6 +2418,7 @@ _PyThread_CurrentFrames(void)
2418
2418
* Because these lists can mutate even when the GIL is held, we
2419
2419
* need to grab head_mutex for the duration.
2420
2420
*/
2421
+ _PyEval_StopTheWorldAll (runtime );
2421
2422
HEAD_LOCK (runtime );
2422
2423
PyInterpreterState * i ;
2423
2424
for (i = runtime -> interpreters .head ; i != NULL ; i = i -> next ) {
@@ -2451,6 +2452,7 @@ _PyThread_CurrentFrames(void)
2451
2452
2452
2453
done :
2453
2454
HEAD_UNLOCK (runtime );
2455
+ _PyEval_StartTheWorldAll (runtime );
2454
2456
return result ;
2455
2457
}
2456
2458
@@ -2482,6 +2484,7 @@ _PyThread_CurrentExceptions(void)
2482
2484
* Because these lists can mutate even when the GIL is held, we
2483
2485
* need to grab head_mutex for the duration.
2484
2486
*/
2487
+ _PyEval_StopTheWorldAll (runtime );
2485
2488
HEAD_LOCK (runtime );
2486
2489
PyInterpreterState * i ;
2487
2490
for (i = runtime -> interpreters .head ; i != NULL ; i = i -> next ) {
@@ -2514,6 +2517,7 @@ _PyThread_CurrentExceptions(void)
2514
2517
2515
2518
done :
2516
2519
HEAD_UNLOCK (runtime );
2520
+ _PyEval_StartTheWorldAll (runtime );
2517
2521
return result ;
2518
2522
}
2519
2523
You can’t perform that action at this time.
0 commit comments