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

Method _undo_acquire

src/filelock/_api.py:1361–1365  ·  view source on GitHub ↗

Roll back the counter after a failed acquire, dropping the registry entry once nothing holds the path.

(self)

Source from the content-addressed store, hash-verified

1359 self._context.lock_file_fd_identity = None
1360
1361 def _undo_acquire(self) -> None:
1362 """Roll back the counter after a failed acquire, dropping the registry entry once nothing holds the path."""
1363 self._context.lock_counter = max(0, self._context.lock_counter - 1)
1364 if self._context.lock_counter == 0:
1365 self._drop_registry_entry()
1366
1367 def _commit_acquire(self, canonical: str) -> None:
1368 """Record this instance as the holder once the first acquire succeeds, so peers can detect the deadlock."""

Callers 1

Calls 1

_drop_registry_entryMethod · 0.95

Tested by

no test coverage detected