Skip to content

Commit 0ebdca4

Browse files
committed
Change some comments.
1 parent e9ea644 commit 0ebdca4

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

Python/pylifecycle.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff 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
}

Python/pystate.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff 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;

0 commit comments

Comments
 (0)