MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / _set_tstate_lock

Method _set_tstate_lock

tools/python-3.11.9-amd64/Lib/threading.py:1015–1026  ·  view source on GitHub ↗

Set a lock object which will be released by the interpreter when the underlying thread state (see pystate.h) gets deleted.

(self)

Source from the content-addressed store, hash-verified

1013 self._native_id = get_native_id()
1014
1015 def _set_tstate_lock(self):
1016 """
1017 Set a lock object which will be released by the interpreter when
1018 the underlying thread state (see pystate.h) gets deleted.
1019 """
1020 self._tstate_lock = _set_sentinel()
1021 self._tstate_lock.acquire()
1022
1023 if not self.daemon:
1024 with _shutdown_locks_lock:
1025 _maintain_shutdown_locks()
1026 _shutdown_locks.add(self._tstate_lock)
1027
1028 def _bootstrap_inner(self):
1029 try:

Callers 3

_bootstrap_innerMethod · 0.95
__init__Method · 0.80
_after_forkFunction · 0.80

Calls 3

_maintain_shutdown_locksFunction · 0.85
acquireMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected