MCPcopy Create free account
hub / github.com/eshirazi/python-with-braces / PyThreadState_IsCurrent

Function PyThreadState_IsCurrent

Python/pystate.c:509–518  ·  view source on GitHub ↗

Keep this as a static, as it is not reliable! It can only ever be compared to the state for the *current* thread. * If not equal, then it doesn't matter that the actual value may change immediately after comparison, as it can't possibly change to the current thread's state. * If equal, then the current thread holds the lock, so the value can't change until we yield the loc

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 2

PyGILState_EnsureFunction · 0.85
PyGILState_ReleaseFunction · 0.85

Calls 1

Tested by

no test coverage detected