summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio
diff options
context:
space:
mode:
authorKumar Aditya <59607654+kumaraditya303@users.noreply.github.com>2022-12-21 09:49:44 (GMT)
committerGitHub <noreply@github.com>2022-12-21 09:49:44 (GMT)
commit4994f2488f8a436ebda3510c779cbfe292bb21a0 (patch)
treed61b296d70a266f41cef8ace41d6fe2399482538 /Lib/asyncio
parent79311cbfe718f17c89bab67d7f89da3931bfa2ac (diff)
downloadcpython-4994f2488f8a436ebda3510c779cbfe292bb21a0.zip
cpython-4994f2488f8a436ebda3510c779cbfe292bb21a0.tar.gz
cpython-4994f2488f8a436ebda3510c779cbfe292bb21a0.tar.bz2
GH-100363: Speed up `asyncio.get_running_loop` (#100364)
Diffstat (limited to 'Lib/asyncio')
-rw-r--r--Lib/asyncio/events.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/asyncio/events.py b/Lib/asyncio/events.py
index 34a8869..6cff8c5 100644
--- a/Lib/asyncio/events.py
+++ b/Lib/asyncio/events.py
@@ -836,6 +836,7 @@ if hasattr(os, 'fork'):
# Reset the loop and wakeupfd in the forked child process.
if _event_loop_policy is not None:
_event_loop_policy._local = BaseDefaultEventLoopPolicy._Local()
+ _set_running_loop(None)
signal.set_wakeup_fd(-1)
os.register_at_fork(after_in_child=on_fork)