Thanks to visit codestin.com Credit goes to github.com
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 dbd08fb commit 8a433b6Copy full SHA for 8a433b6
1 file changed
Modules/_asynciomodule.c
@@ -3723,6 +3723,11 @@ 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.
3729
+ _PyThreadStateImpl *ts = (_PyThreadStateImpl *)_PyThreadState_GET();
3730
+ Py_CLEAR(ts->asyncio_running_loop);
3731
3732
return 0;
3733
}
0 commit comments