stouputils.lock.shared module#
- exception LockTimeoutError[source]#
Bases:
TimeoutError,LockErrorRaised when a lock could not be acquired within
timeoutseconds.
- resolve_path(path: str) → str[source]#
Resolve a lock file path, placing it in the system temporary directory if only a name is given.
Examples
>>> import os, tempfile >>> p = resolve_path('foo.lock') >>> os.path.basename(p) == 'foo.lock' True
- resolve_acquire_defaults(
- blocking_arg: bool | None,
- timeout_arg: float | None,
- check_interval_arg: float | None,
- default_blocking: bool,
- default_timeout: float | None,
- default_check_interval: float,
Resolve acquire() parameter defaults and compute the deadline.
- Returns:
(blocking, timeout, check_interval, deadline)
- Return type:
tuple