We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5801138 commit 5222bb6Copy full SHA for 5222bb6
Modules/_asynciomodule.c
@@ -3723,7 +3723,9 @@ module_clear(PyObject *mod)
3723
Py_CLEAR(state->iscoroutine_typecache);
3724
3725
Py_CLEAR(state->context_kwname);
3726
-
+ // Clear the ref to running loop so that finalizers can run early.
3727
+ // If there are other running loops in different threads,
3728
+ // those get cleared in PyThreadState_Clear later.
3729
_PyThreadStateImpl *ts = (_PyThreadStateImpl *)_PyThreadState_GET();
3730
Py_CLEAR(ts->asyncio_running_loop);
3731
0 commit comments