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

Method _is_owned

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

Source from the content-addressed store, hash-verified

319 self._lock.acquire() # Ignore saved state
320
321 def _is_owned(self):
322 # Return True if lock is owned by current_thread.
323 # This method is called only if _lock doesn't have _is_owned().
324 if self._lock.acquire(False):
325 self._lock.release()
326 return False
327 else:
328 return True
329
330 def wait(self, timeout=None):
331 """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