File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3472,6 +3472,7 @@ wait_for_native_shutdown(PyInterpreterState *interp)
34723472 struct _Py_finalizing_threads * finalizing = & interp -> threads .finalizing ;
34733473 PyMutex_Lock (& finalizing -> mutex );
34743474 if (finalizing -> countdown == 0 ) {
3475+ // Nothing to do.
34753476 PyMutex_Unlock (& finalizing -> mutex );
34763477 return ;
34773478 }
Original file line number Diff line number Diff line change @@ -3292,8 +3292,9 @@ PyThreadState_Ensure(PyInterpreterState *interp)
32923292 }
32933293 PyThreadState * save = _PyThreadState_GET ();
32943294 if (save != NULL && save -> interp == interp ) {
3295+ /* We already have a thread state that matches the
3296+ interpreter. */
32953297 Py_ssize_t refcnt = decref_interpreter (interp );
3296- assert (refcnt > 1 );
32973298 entry -> was_daemon = save -> daemon ;
32983299 entry -> next = save -> ensured ;
32993300 entry -> prior_tstate = NULL ;
You can’t perform that action at this time.
0 commit comments