mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
GH-100363: Speed up asyncio.get_running_loop
(#100364)
This commit is contained in:
parent
79311cbfe7
commit
4994f2488f
3 changed files with 14 additions and 118 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue