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

Method _after_fork

Lib/threading.py:941–953  ·  view source on GitHub ↗
(self, new_ident=None)

Source from the content-addressed store, hash-verified

939 _dangling.add(self)
940
941 def _after_fork(self, new_ident=None):
942 # Private! Called by threading._after_fork().
943 self._started._at_fork_reinit()
944 if new_ident is not None:
945 # This thread is alive.
946 self._ident = new_ident
947 assert self._os_thread_handle.ident == new_ident
948 if _HAVE_THREAD_NATIVE_ID:
949 self._set_native_id()
950 else:
951 # Otherwise, the thread is dead, Jim. _PyThread_AfterFork()
952 # already marked our handle done.
953 pass
954
955 def __repr__(self):
956 assert self._initialized, "Thread.__init__() was not called"

Callers 2

_after_forkMethod · 0.45
_after_forkFunction · 0.45

Calls 2

_set_native_idMethod · 0.95
_at_fork_reinitMethod · 0.45

Tested by

no test coverage detected