(root: Path)
| 57 | |
| 58 | |
| 59 | def _backends(root: Path) -> Iterator[tuple[str, Callable[[], filelock.BaseFileLock]]]: |
| 60 | # Each entry builds a fresh lock on its own path so no two cases contend. ReadWriteLock is soft-optional, so it is |
| 61 | # measured separately where it applies rather than through this exclusive-lock set. |
| 62 | yield "FileLock", lambda: FileLock(str(root / "file.lock")) |
| 63 | yield "SoftFileLock", lambda: SoftFileLock(str(root / "soft.lock")) |
| 64 | yield "StrictSoftFileLock", lambda: StrictSoftFileLock(str(root / "strict.lock")) |
| 65 | yield "SoftFileLease", lambda: SoftFileLease(str(root / "lease.lock"), lease_duration=30) |
| 66 | |
| 67 | |
| 68 | def _uncontended(root: Path) -> list[Sample]: |
no test coverage detected