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

Method _is_owned

Lib/threading.py:328–335  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

326 self._lock.acquire() # Ignore saved state
327
328 def _is_owned(self):
329 # Return True if lock is owned by current_thread.
330 # This method is called only if _lock doesn't have _is_owned().
331 if self._lock.acquire(False):
332 self._lock.release()
333 return False
334 else:
335 return True
336
337 def wait(self, timeout=None):
338 """Wait until notified or until a timeout occurs.

Callers 2

waitMethod · 0.95
notifyMethod · 0.95

Calls 2

acquireMethod · 0.45
releaseMethod · 0.45

Tested by

no test coverage detected