MCPcopy Index your code
hub / github.com/RustPython/RustPython / on_fork

Function on_fork

Lib/asyncio/events.py:871–876  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

869
870if hasattr(os, 'fork'):
871 def on_fork():
872 # Reset the loop and wakeupfd in the forked child process.
873 if _event_loop_policy is not None:
874 _event_loop_policy._local = _BaseDefaultEventLoopPolicy._Local()
875 _set_running_loop(None)
876 signal.set_wakeup_fd(-1)
877
878 os.register_at_fork(after_in_child=on_fork)

Callers

nothing calls this directly

Calls 2

_set_running_loopFunction · 0.90
set_wakeup_fdMethod · 0.80

Tested by

no test coverage detected