MCPcopy Create free account
hub / github.com/tox-dev/filelock / _deadlock_scope

Method _deadlock_scope

src/filelock/_api.py:1193–1201  ·  view source on GitHub ↗

Execution unit whose own hold would deadlock a new acquire. ``None`` scopes holders to the thread, which the thread-local registry already separates. Async locks override it with the running task, since one event loop thread runs many tasks and only a reacquire from

()

Source from the content-addressed store, hash-verified

1191
1192 @staticmethod
1193 def _deadlock_scope() -> Hashable | None:
1194 """
1195 Execution unit whose own hold would deadlock a new acquire.
1196
1197 ``None`` scopes holders to the thread, which the thread-local registry already separates. Async locks
1198 override it with the running task, since one event loop thread runs many tasks and only a reacquire from
1199 the *same* task can self-deadlock.
1200 """
1201 return None
1202
1203 def _poll_until_acquired(
1204 self,

Callers 1

_registry_keyMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected