Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/python/cpython
/ locked
Method
locked
Lib/asyncio/locks.py:86–88 ·
view source on GitHub ↗
Return True if lock is acquired.
(self)
Source
from the content-addressed store, hash-verified
84
return
f
'<{res[1:-1]} [{extra}]>'
85
86
def
locked(self):
87
""
"Return True if lock is acquired."
""
88
return
self._locked
89
90
async
def
acquire(self):
91
""
"Acquire a lock.
Callers
11
test_lock
Method · 0.95
test_lock_locked_2processes
Method · 0.95
test_lock
Method · 0.95
test_cancel_race
Method · 0.95
test_finished_waiter_cancelled
Method · 0.95
test_release_no_waiters
Method · 0.95
test_context_manager
Method · 0.95
f
Method · 0.95
__repr__
Method · 0.45
wait
Method · 0.45
notify
Method · 0.45
Calls
no outgoing calls
Tested by
8
test_lock
Method · 0.76
test_lock_locked_2processes
Method · 0.76
test_lock
Method · 0.76
test_cancel_race
Method · 0.76
test_finished_waiter_cancelled
Method · 0.76
test_release_no_waiters
Method · 0.76
test_context_manager
Method · 0.76
f
Method · 0.76