MCPcopy Index your code
hub / github.com/python/cpython / _run_after_forkers

Function _run_after_forkers

Lib/multiprocessing/util.py:233–240  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

231_afterfork_counter = itertools.count()
232
233def _run_after_forkers():
234 items = list(_afterfork_registry.items())
235 items.sort()
236 for (index, ident, func), obj in items:
237 try:
238 func(obj)
239 except Exception as e:
240 info('after forker raised exception %s', e)
241
242def register_after_fork(obj, func):
243 _afterfork_registry[(next(_afterfork_counter), id(obj), func)] = obj

Callers

nothing calls this directly

Calls 5

listClass · 0.85
infoFunction · 0.70
funcFunction · 0.50
itemsMethod · 0.45
sortMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…