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

Method _is_owned

tools/python-3.11.9-amd64/Lib/threading.py:286–293  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

284 self._lock.acquire() # Ignore saved state
285
286 def _is_owned(self):
287 # Return True if lock is owned by current_thread.
288 # This method is called only if _lock doesn't have _is_owned().
289 if self._lock.acquire(False):
290 self._lock.release()
291 return False
292 else:
293 return True
294
295 def wait(self, timeout=None):
296 """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