Skip to content
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Modules/_asynciomodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -3723,6 +3723,11 @@ module_clear(PyObject *mod)
Py_CLEAR(state->iscoroutine_typecache);

Py_CLEAR(state->context_kwname);
// Clear the ref to running loop so that finalizers can run early.
// If there are other running loops in different threads,
// those get cleared in PyThreadState_Clear later.
_PyThreadStateImpl *ts = (_PyThreadStateImpl *)_PyThreadState_GET();
Py_CLEAR(ts->asyncio_running_loop);

return 0;
}
Expand Down
Loading