MCPcopy Create free account

hub / github.com/tox-dev/filelock / functions

Functions3,548 in github.com/tox-dev/filelock

↓ 686 callersMethodacquire
Acquire the lock and return a context manager that releases it on exit. :param timeout: seconds to wait. A negative value waits inde
src/filelock/_core/_lock.py:158
↓ 434 callersMethodrelease
Release one acquisition. The final release unlocks the file and may remove its pathname. :param force: release every level held by t
src/filelock/_core/_release.py:54
↓ 305 callersMethodclose
Release every hold on this instance, including other threads' holds, and close it.
src/filelock/_sqlite/_lock.py:435
↓ 269 callersMethodwait
Wait for this release, including after another thread acquires the lock again. :param timeout: seconds to wait, or ``None`` to wait
src/filelock/_core/_errors.py:70
↓ 211 callersFunctionlock_type
(request: pytest.FixtureRequest)
tests/sqlite/conftest.py:67
↓ 120 callersMethodacquire_write
Acquire an exclusive write lock. Only its owning thread can reenter or release it. :param timeout: wait in seconds, or ``None`` for
src/filelock/_sqlite/_lock.py:418
↓ 118 callersMethodjoin
(self, timeout: float | None = None)
tests/core/thread_helpers.py:30
↓ 82 callersMethodunlink
(self, path: str, *, witness: str | None = None)
tests/soft/read_write/test_participant_model.py:300
↓ 80 callersMethodacquire_read
Acquire a shared read lock. Repeated acquisitions by the same thread each require a release. :param timeout: wait in seconds, or ``N
src/filelock/_sqlite/_lock.py:154
↓ 76 callersMethodsleep
(self, seconds: float)
tests/soft/read_write/test_participant_model.py:112
↓ 57 callersFunctionhost_name
()
src/filelock/_identity/_host.py:18
↓ 57 callersMethodlatest
(self)
src/filelock/_soft/_read_write/_generations.py:47
↓ 57 callersMethodsubmit
(self, fn: Callable[_P, _T], /, *args: _P.args, **kwargs: _P.kwargs)
tests/async_lock/cancellation.py:88
↓ 54 callersMethodclose
Release any held lock and mark the instance closed. Pending and future acquires raise :class:`RuntimeError`. Closing again, includin
src/filelock/_soft/_read_write/_lock.py:450
↓ 54 callersMethodwrite_lock
Hold an exclusive write lock for the duration of the context. :param timeout: wait in seconds, or ``None`` for the instance default
src/filelock/_sqlite/_lock.py:404
↓ 53 callersMethodrun
(self)
tests/core/thread_helpers.py:23
↓ 51 callersMethodcancel
( self, msg: object | None = None, # simplint: ignore[imprecise-annotation] # Task.cancel ac
tests/async_lock/test_executor.py:81
↓ 49 callersMethodread_lock
Hold a shared read lock for the duration of the context. :param timeout: wait in seconds, or ``None`` for the instance default
src/filelock/_sqlite/_lock.py:140
↓ 48 callersMethodget
(self, cls: type[BaseFileLock])
src/filelock/_core/_settings.py:294
↓ 47 callersFunctionmake_async_lock
( tmp_path: Path, name: str = "foo.lock", *, timeout: float = -1, blocking: bool = True,
tests/soft/read_write/async_helpers.py:24
↓ 43 callersFunctionprocess_start_token
(pid: int)
src/filelock/_identity/_process.py:79
↓ 41 callersFunctionmake_lock
( path: str, *, heartbeat_interval: float = 0.1, stale_threshold: float = 0.5, poll_interv
tests/soft/read_write/lock_helpers.py:34
↓ 40 callersMethodencode
(self)
src/filelock/_soft/_read_write/_generations.py:230
↓ 39 callersMethodrelease
Release one level held by this thread. :param force: release all levels, including those held by other threads :raises Runti
src/filelock/_sqlite/_lock.py:340
↓ 38 callersMethodcommit
(self, successor: Snapshot)
src/filelock/_soft/_read_write/_generations.py:148
↓ 38 callersFunctionholder_record
(pid: int, *, host: str = HOST, start: int | None = None)
tests/soft/exclusive/recovery_helpers.py:104
↓ 37 callersFunctioncommitted
(files: OsFiles, lock_file: str, root: str, writers: list[str | None])
tests/soft/read_write/conftest.py:94
↓ 35 callersFunctionmake_lease
( marker: Path, *, lease_duration: float = DURATION, timeout: float = 0.3, on_compromise:
tests/soft/lease_helpers.py:22
↓ 32 callersMethodpublish
(self)
src/filelock/_soft/_read_write/_participant.py:66
↓ 31 callersMethodadvance
(self)
src/filelock/_soft/_read_write/_participant.py:86
↓ 30 callersMethodadd
(self, mode: Literal["read", "write"], hold_beats: int)
tests/soft/read_write/test_participant_model.py:168
↓ 30 callersFunctionassert_file_lock_state
(lock_file: str, *, available: bool)
tests/async_lock/cancellation.py:37
↓ 30 callersMethodunlink
(self, path: str, *, witness: str | None = None)
src/filelock/_soft/_read_write/_storage.py:207
↓ 29 callersFunctionmake_participant
( files: OsFiles, lock_file: str, mode: Literal["read", "write"], *, stale_threshold: floa
tests/soft/read_write/conftest.py:102
↓ 29 callersFunctionowner_is_stale
(pid: int, hostname: str, start_token: int | None)
src/filelock/_identity/_process.py:21
↓ 28 callersFunctionassert_read_write_lock_state
(lock_file: str, mode: Literal["read", "write"], *, available: bool)
tests/read_write_helpers.py:49
↓ 28 callersMethodrun
(self)
tests/soft/read_write/test_participant_model.py:234
↓ 28 callersFunctionwriter_gets_in
(lock_file: str | os.PathLike[str])
tests/read_write_helpers.py:90
↓ 25 callersFunctioncleanup_processes
(processes: list[BaseProcess])
tests/process_helpers.py:23
↓ 24 callersMethodacquire_write
Acquire an exclusive write lock for the current task. :param timeout: seconds to wait, or ``None`` for the instance default
src/filelock/_sqlite/_async.py:154
↓ 24 callersFunctioninitialize_protocol
(lock_path: Path)
tests/soft/strict/claim_records.py:9
↓ 23 callersMethodclear
(self)
src/filelock/_core/_settings.py:300
↓ 23 callersFunctionfork_process
(child: Callable[[], NoReturn])
tests/fork_helpers.py:31
↓ 23 callersFunctionrecovery_name
(lock: Path, pid: int = DEAD_PID)
tests/soft/exclusive/recovery_helpers.py:46
↓ 23 callersMethodrelease_with_timeout
Release one acquisition. On Windows, limit how long the caller waits for the final release. POSIX releases synchronously. On Windows
src/filelock/_soft/_strict/_release.py:40
↓ 22 callersFunctionacquire
()
tests/soft/test_lease_finalization.py:56
↓ 22 callersFunctionexchange_names
(source: str, target: str)
src/filelock/_filesystem/_exchange.py:170
↓ 20 callersMethodacquire_read
Acquire a shared read lock for the current task. :param timeout: seconds to wait, or ``None`` for the instance default :para
src/filelock/_sqlite/_async.py:86
↓ 20 callersFunctionensure_current_process
(*, from_hook: bool = False)
src/filelock/_core/_fork.py:286
↓ 19 callersFunctionfork_transition
(descriptor_owner: ForkDescriptorOwner | None = None)
src/filelock/_core/_fork.py:75
↓ 19 callersMethodrelease
Release one level. The final release withdraws the participant. A forked child preserves the parent's hold. :param force: if ``True`
src/filelock/_soft/_read_write/_lock.py:378
↓ 18 callersMethodheartbeat
(self)
src/filelock/_soft/_read_write/_participant.py:194
↓ 18 callersMethodprepare
(self, root: str, *, force: bool = False)
tests/soft/read_write/test_participant_model.py:315
↓ 18 callersFunctionwrite_held_claim
(claims: Path)
tests/soft/strict/claim_records.py:20
↓ 15 callersMethod_hold_state
(self)
src/filelock/_core/_state.py:326
↓ 15 callersFunctionassert_times_out
(lock_path: Path, *, timeout: float = 0.1)
tests/soft/exclusive/recovery_helpers.py:36
↓ 15 callersFunctionenter
(blocking: bool = True, timeout: float = -1)
tests/soft/strict/test_release_observers.py:66
↓ 15 callersMethodleave
(self)
src/filelock/_soft/_read_write/_participant.py:170
↓ 15 callersFunctionwrite_foreign_claim
(claims: Path, token: str, state: str = "held")
tests/soft/strict/claim_records.py:14
↓ 14 callersMethodacquire_write
Acquire a thread-owned write lock. Reentry adds one level. :param timeout: wait limit in seconds, ``-1`` to wait indefinitely, or ``
src/filelock/_soft/_read_write/_lock.py:434
↓ 14 callersFunctionexit_child
(status: int)
tests/fork_helpers.py:46
↓ 14 callersMethodforce_break
Remove one named claim, allowing overlap if its owner still holds the protected resource. :param claim_name: the file name of the cl
src/filelock/_soft/_strict/_lock.py:383
↓ 14 callersFunctionhost_digest
(shared_database: Path, *, legacy: bool = False)
tests/sqlite/link_support.py:20
↓ 14 callersFunctionlock_descriptor
Lock a caller-owned descriptor with the same primitive as :class:`FileLock`. Unix locks the whole file with :func:`fcntl.flock`. Windows loc
src/filelock/_native/_descriptor.py:33
↓ 14 callersFunctionread_state
(lock_file: str)
tests/soft/read_write/lock_helpers.py:21
↓ 14 callersFunctionrun_fork_script
(script: str, arguments: list[str], *, timeout: float)
tests/sqlite/process_support.py:82
↓ 13 callersMethodlink
(self, source: str, target: str)
tests/soft/read_write/test_participant_model.py:259
↓ 13 callersFunctionraise_cleanup_errors
( message: str, primary_error: BaseException, *cleanup_errors: BaseException | None, )
src/filelock/_core/_errors.py:302
↓ 13 callersMethodread
(self, path: str)
src/filelock/_soft/_read_write/_storage.py:97
↓ 13 callersFunctionwriter_gets_in
(lock_file: str)
tests/soft/read_write/lock_helpers.py:25
↓ 12 callersFunctionassert_cancellation_message
(error: asyncio.CancelledError, message: str)
tests/async_lock/cancellation.py:29
↓ 12 callersFunctionpatch_strict_clock
( mocker: MockerFixture, module: str, *, monotonic: Callable[[], float] = time.monotonic,
tests/soft/strict/filesystem_faults.py:51
↓ 12 callersFunctionpin_pid_namespace
(mocker: MockerFixture, namespace: int | OSError)
tests/pid_namespace_helpers.py:17
↓ 12 callersMethodprepare
(self, root: str, *, force: bool = False)
src/filelock/_soft/_read_write/_storage.py:295
↓ 12 callersFunctionseconds
(name: str, value: ExtraValue)
src/filelock/_core/_settings.py:120
↓ 11 callersMethod_mark_descriptor_released
(self)
src/filelock/_core/_state.py:336
↓ 11 callersMethodcreate
(self, path: str, data: bytes, *, durable: bool = False)
src/filelock/_soft/_read_write/_storage.py:190
↓ 11 callersFunctionhold_oplock
()
tests/conftest.py:322
↓ 11 callersFunctionlive_record
(record: str)
tests/soft/exclusive/recovery_helpers.py:50
↓ 11 callersFunctionprivate_claim_path
(lock_path: Path, token: str)
tests/soft/strict/claim_records.py:27
↓ 10 callersFunctioncall_within
(call: Callable[[], object], seconds: float)
tests/process_helpers.py:55
↓ 10 callersFunctionclose_after_commit
(mocker: MockerFixture, lock: SoftFileLock)
tests/soft/exclusive/recovery_helpers.py:68
↓ 10 callersFunctiondescriptors_on
(node: os.stat_result)
tests/descriptor_helpers.py:11
↓ 10 callersMethodread
(self, path: str)
tests/soft/read_write/test_participant_model.py:254
↓ 10 callersFunctionread_existing_claims
( lock_file: str, directory: Path, *, entry_limit: int | None, verify_server: bool = sys.p
src/filelock/_soft/_strict/_scan.py:75
↓ 10 callersFunctionread_lock_file
(path: str)
src/filelock/_soft/_records.py:38
↓ 10 callersFunctionwrite_all
(fd: int, data: bytes)
src/filelock/_filesystem/_files.py:87
↓ 9 callersFunctionforeign_owner
(node: os.stat_result, parent: os.stat_result, *, fd: int | None = None)
src/filelock/_filesystem/_ownership.py:19
↓ 9 callersFunctionholders
(lock_file: str)
tests/soft/read_write/lock_helpers.py:53
↓ 9 callersFunctioninterrupt_unix_create
( lock: UnixFileLock, error: type[BaseException] = KeyboardInterrupt )
tests/native/conftest.py:20
↓ 9 callersMethodresume
(self)
tests/soft/read_write/async_helpers.py:100
↓ 9 callersFunctionroute_record_opens_through_os_open
(mocker: MockerFixture, *, claims: bool = True)
tests/soft/strict/filesystem_faults.py:77
↓ 9 callersFunctionunlock_descriptor
Release a lock taken by :func:`lock_descriptor` and leave the descriptor open. :param fd: descriptor holding the lock :raises OSError: t
src/filelock/_native/_descriptor.py:62
↓ 9 callersMethodyield_turn
(self, wake_at: float | None = None)
tests/soft/read_write/test_participant_model.py:115
↓ 8 callersFunction_cancel_acquire_in_hook
( # pragma: needs fcntl tmp_path: Path, policy: ContextErrorPolicy, hook_error: BaseException | N
tests/async_lock/test_acquire_cancellation_errors.py:53
↓ 8 callersFunctionassert_self_heals
(lock_path: Path)
tests/soft/exclusive/recovery_helpers.py:31
↓ 8 callersFunctionbreak_contents
(lock: Path)
tests/soft/exclusive/recovery_helpers.py:54
↓ 8 callersFunctioncheck_blocking
(blocking: bool)
src/filelock/_core/_settings.py:226
↓ 8 callersFunctionfork_descriptor_probe
( # pragma: needs fork descriptor: int, stat_descriptor: Callable[[int], os.stat_result] )
tests/core/fork_probes.py:27
↓ 8 callersMethodhold
Wait for a turn to complete a transition. :param owed: keep a canceled task queued while it still owes a release :yields: th
src/filelock/_async_lock/_transitions.py:27
next →1–100 of 3,548, ranked by callers