File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2435,12 +2435,12 @@ finalize_subinterpreters(void)
24352435 struct pyinterpreters * interpreters = & runtime -> interpreters ;
24362436
24372437 /* Get the first interpreter in the list. */
2438- HEAD_LOCK ( runtime );
2438+ INTERP_THREAD_LOCK ( main_interp );
24392439 PyInterpreterState * interp = interpreters -> head ;
24402440 if (interp == main_interp ) {
24412441 interp = interp -> next ;
24422442 }
2443- HEAD_UNLOCK ( runtime );
2443+ INTERP_THREAD_UNLOCK ( main_interp );
24442444
24452445 /* Bail out if there are no subinterpreters left. */
24462446 if (interp == NULL ) {
@@ -2485,12 +2485,12 @@ finalize_subinterpreters(void)
24852485 assert (_PyThreadState_GET () == NULL );
24862486
24872487 /* Advance to the next interpreter. */
2488- HEAD_LOCK ( runtime );
2488+ INTERP_THREAD_LOCK ( interp );
24892489 interp = interpreters -> head ;
24902490 if (interp == main_interp ) {
24912491 interp = interp -> next ;
24922492 }
2493- HEAD_UNLOCK ( runtime );
2493+ INTERP_THREAD_UNLOCK ( interp );
24942494 }
24952495
24962496 /* Switch back to the main interpreter. */
You can’t perform that action at this time.
0 commit comments