diff options
Diffstat (limited to 'Python')
| -rw-r--r-- | Python/pystate.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/pystate.c b/Python/pystate.c index 900cba0..5222a7e 100644 --- a/Python/pystate.c +++ b/Python/pystate.c @@ -1587,10 +1587,10 @@ new_threadstate(PyInterpreterState *interp, int whence) HEAD_UNLOCK(interp->runtime); #ifdef Py_GIL_DISABLED - if (id == 1) { + if (id > 1) { if (_Py_atomic_load_int(&interp->gc.immortalize) == 0) { // Immortalize objects marked as using deferred reference counting - // the first time a non-main thread is created. + // once a non-main thread is created, if we haven't already done so. _PyGC_ImmortalizeDeferredObjects(interp); } } |
