Record this instance as the holder once the first acquire succeeds, so peers can detect the deadlock.
(self, canonical: str)
| 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.""" |
| 1369 | if self._context.lock_counter == 1: |
| 1370 | key = self._registry_key(canonical) |
| 1371 | # The holder scope is resolved once at commit so a later release from another flow drops the right entry. |
| 1372 | self._context.lock_file_key = key |
| 1373 | _registry.held[key] = id(self) |
| 1374 | |
| 1375 | def _drop_registry_entry(self) -> None: |
| 1376 | """Forget the key owned by this hold without resolving a mutable path again.""" |
no test coverage detected