MCPcopy Create free account

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

Functions572 in github.com/tox-dev/filelock

↓ 107 callersMethodacquire
Try to acquire the file lock. :param timeout: maximum wait time for acquiring the lock, ``None`` means use the default :attr:`~timeo
src/filelock/_api.py:438
↓ 69 callersMethodjoin
(self, timeout: float | None = None)
tests/test_filelock.py:239
↓ 68 callersMethodrelease
Release the file lock. The lock is only completely released when the lock counter reaches 0. The lock file itself may be deleted auto
src/filelock/_api.py:564
↓ 67 callersMethodclose
Release the lock (if held) and close the underlying SQLite connection. After calling this method, the lock instance is no longer usa
src/filelock/_read_write.py:375
↓ 34 callersMethodacquire_write
Acquire an exclusive write lock. If this instance already holds a write lock from the same thread, the lock level is incremented (re
src/filelock/_read_write.py:277
↓ 33 callersMethodwrite_lock
Context manager that acquires and releases an exclusive write lock. Falls back to instance defaults for *timeout* and *blocking* whe
src/filelock/_read_write.py:355
↓ 31 callersFunction_make_lock
( path: str, *, heartbeat_interval: float = 0.1, stale_threshold: float = 0.5, poll_interv
tests/soft_rw/test_soft_rw_sync.py:113
↓ 31 callersMethodread_lock
Context manager that acquires and releases a shared read lock. Falls back to instance defaults for *timeout* and *blocking* when ``N
src/filelock/_read_write.py:334
↓ 26 callersMethodacquire_read
Acquire a shared read lock. If this instance already holds a read lock, the lock level is incremented (reentrant). Attempting to acq
src/filelock/_read_write.py:259
↓ 25 callersMethodclose
Release any held lock and release internal filesystem resources. Idempotent. After calling this method the instance can no longer ac
src/filelock/_soft_rw/_sync.py:325
↓ 21 callersMethodrelease
Release one level of the current lock. When the lock level reaches zero the underlying SQLite transaction is rolled back, releasing
src/filelock/_read_write.py:297
↓ 15 callersFunctioncleanup_processes
(processes: list[Process])
tests/test_read_write.py:45
↓ 14 callersMethodrelease
Release one level of the current lock. See :meth:`ReadWriteLock.release` for full semantics. :param force: if ``True``, rel
src/filelock/_async_read_write.py:140
↓ 13 callersFunction_holder
(pid: int, *, host: str = HOST, creation_time: int | None = None)
tests/test_soft_stale.py:32
↓ 12 callersMethodrelease
Release one level of the current lock. When the lock level reaches zero the heartbeat thread is stopped and the held marker file is
src/filelock/_soft_rw/_sync.py:342
↓ 11 callersMethodexecute
(self, sql: str)
tests/test_read_write_unit.py:638
↓ 10 callersFunction_cleanup
(processes: list[Process])
tests/soft_rw/test_soft_rw_sync.py:88
↓ 10 callersMethodacquire_write
Acquire an exclusive write lock. See :meth:`ReadWriteLock.acquire_write` for full semantics. :param timeout: maximum wait t
src/filelock/_async_read_write.py:122
↓ 9 callersFunction_assert_times_out
(lock_path: Path)
tests/test_soft_stale.py:43
↓ 9 callersMethodacquire_read
Acquire a shared read lock. See :meth:`ReadWriteLock.acquire_read` for full semantics. :param timeout: maximum wait time in
src/filelock/_async_read_write.py:104
↓ 9 callersMethodacquire_write
Acquire an exclusive write lock. If this instance already holds a write lock from the same thread, the lock level is incremented (re
src/filelock/_soft_rw/_sync.py:298
↓ 9 callersFunctionbreak_lock_file
Atomically break a stale lock file that was judged stale at modification time *mtime_before*. The file is renamed to a process-private name
src/filelock/_util.py:55
↓ 9 callersFunctiontimeout_for_sqlite
(timeout: float, *, blocking: bool, already_waited: float)
src/filelock/_read_write.py:40
↓ 8 callersFunction_make
( tmp_path: Path, name: str = "foo.lock", *, timeout: float = -1, blocking: bool = True,
tests/soft_rw/test_soft_rw_async.py:28
↓ 7 callersMethodread_lock
Async context manager that acquires and releases a shared read lock. Falls back to instance defaults for *timeout* and *blocking* wh
src/filelock/_async_read_write.py:154
↓ 6 callersFunctionraise_on_not_writable_file
Raise an exception if attempting to open the file for writing would fail. This is done so files that will never be writable can be separated
src/filelock/_util.py:11
↓ 5 callersMethod_get_process_creation_time
Return the process creation FILETIME as an integer on Windows, ``None`` otherwise.
src/filelock/_soft.py:107
↓ 5 callersMethod_open_mode
:returns: the mode for os.open() — 0o666 when unset (let umask/ACLs decide), else the explicit mode
src/filelock/_api.py:372
↓ 5 callersFunction_unlink
(name: str, *, dir_fd: int | None = None)
src/filelock/_soft_rw/_sync.py:869
↓ 5 callersMethodwrite_lock
Async context manager that acquires and releases an exclusive write lock. Falls back to instance defaults for *timeout* and *blockin
src/filelock/_async_read_write.py:175
↓ 4 callersMethod__init__
(self, target: Callable[[], None], name: str)
tests/test_filelock.py:229
↓ 4 callersFunction_assert_self_heals
(lock_path: Path)
tests/test_soft_stale.py:37
↓ 4 callersFunction_fork_process
(target: Callable[..., object], args: tuple[object, ...] = ())
tests/soft_rw/test_soft_rw_sync.py:914
↓ 4 callersMethod_run
(self, func: Callable[..., object], *args: object, **kwargs: object)
src/filelock/_async_read_write.py:100
↓ 4 callersMethod_run
(self, func: Callable[..., object], *args: object, **kwargs: object)
src/filelock/_soft_rw/_async.py:205
↓ 4 callersMethodacquire_read
Acquire a shared read lock. If this instance already holds a read lock, the lock level is incremented (reentrant). Attempting to acq
src/filelock/_soft_rw/_sync.py:275
↓ 4 callersMethodclose
Release the lock (if held) and close the underlying SQLite connection. After calling this method, the lock instance is no longer usa
src/filelock/_async_read_write.py:195
↓ 4 callersFunctionensure_directory_exists
Ensure the directory containing the file exists (create it if necessary). :param filename: file.
src/filelock/_util.py:45
↓ 4 callersMethodget_lock
Return the singleton :class:`ReadWriteLock` for *lock_file*. :param lock_file: path to the SQLite database file used as the lock
src/filelock/_read_write.py:124
↓ 4 callersMethodrelease
Release the file lock. The lock is only completely released when the lock counter reaches 0. The lock file itself may be deleted auto
src/filelock/asyncio.py:305
↓ 4 callersMethodrollback
(self)
tests/test_read_write_unit.py:593
↓ 3 callersFunction_atomic_create_marker
(name: str, token: str, *, dir_fd: int | None = None)
src/filelock/_soft_rw/_sync.py:753
↓ 3 callersFunction_break_stale_marker
( # noqa: PLR0911 name: str, *, stale_threshold: float, now: float, dir_fd: int | None =
src/filelock/_soft_rw/_sync.py:824
↓ 3 callersFunction_check_file_read_write
(txt_file: Path)
tests/test_filelock.py:677
↓ 3 callersFunction_fork_event
()
tests/soft_rw/test_soft_rw_sync.py:921
↓ 3 callersFunction_open_marker
(name: str, *, dir_fd: int | None = None)
src/filelock/_soft_rw/_sync.py:768
↓ 3 callersFunction_parse_lock_holder
(content: str | None)
src/filelock/_soft.py:221
↓ 3 callersFunction_parse_marker_bytes
(data: bytes)
src/filelock/_soft_rw/_sync.py:794
↓ 3 callersFunction_read_lock_file
(path: str)
src/filelock/_soft.py:204
↓ 3 callersFunction_read_marker
(name: str, *, dir_fd: int | None = None)
src/filelock/_soft_rw/_sync.py:779
↓ 3 callersMethod_wait_for
( self, predicate: Callable[[], bool], *, deadline: float | None, bloc
src/filelock/_soft_rw/_sync.py:615
↓ 3 callersFunctionpytest_sessionfinish
()
tests/conftest.py:16
↓ 3 callersMethodrelease
Release one level of the current lock. :param force: if ``True``, release the lock completely regardless of the current lock level
src/filelock/_soft_rw/_async.py:154
↓ 3 callersMethodrun_in_executor
Whether run in executor.
src/filelock/asyncio.py:183
↓ 2 callersMethod_acquire
(self, mode: Literal["read", "write"], timeout: float, *, blocking: bool)
src/filelock/_read_write.py:214
↓ 2 callersMethod_acquire
( self, mode: _Mode, timeout: float | None, *, blocking: bool | None,
src/filelock/_soft_rw/_sync.py:456
↓ 2 callersMethod_check_give_up
( # noqa: PLR0913 lock_id: int, lock_filename: str, *, blocking: bool,
src/filelock/_api.py:418
↓ 2 callersMethod_claim_writer_marker
(self, token: str)
src/filelock/_soft_rw/_sync.py:400
↓ 2 callersFunction_cleanup_connections
()
src/filelock/_read_write.py:26
↓ 2 callersFunction_file_exists
(path: str)
src/filelock/_soft_rw/_sync.py:889
↓ 2 callersFunction_is_housekeeping_name
(name: str)
src/filelock/_soft_rw/_sync.py:897
↓ 2 callersMethod_iter_reader_entries
Yield ``(name, dirfd_relative)`` pairs for every live reader marker. ``dirfd_relative`` is ``True`` when *name* should be passed to
src/filelock/_soft_rw/_sync.py:654
↓ 2 callersMethod_open_readers_dir
(self)
src/filelock/_soft_rw/_sync.py:635
↓ 2 callersMethod_run_internal_method
(self, method: Callable[[], Any])
src/filelock/asyncio.py:324
↓ 2 callersFunction_touch
(name: str, *, fd: int | None = None)
src/filelock/_soft_rw/_sync.py:878
↓ 2 callersMethod_try_break_expired_lock
Remove the lock file if its modification time exceeds the configured :attr:`lifetime`.
src/filelock/_api.py:376
↓ 2 callersMethod_unlink_writer_marker_if_ours
(self, token: str)
src/filelock/_soft_rw/_sync.py:384
↓ 2 callersMethod_validate_reentrant
(self, mode: Literal["read", "write"])
src/filelock/_read_write.py:171
↓ 2 callersMethod_validate_reentrant
(self, mode: _Mode)
src/filelock/_soft_rw/_sync.py:528
↓ 2 callersFunctionmake_ro
(path: Path)
tests/test_filelock.py:61
↓ 2 callersMethodread_lock
Context manager that acquires and releases a shared read lock. Falls back to instance defaults for *timeout* and *blocking* when ``N
src/filelock/_soft_rw/_sync.py:236
↓ 1 callersMethod__init__
Create a new lock object. :param lock_file: path to the file :param timeout: default timeout when acquiring the lock, in sec
src/filelock/_api.py:199
↓ 1 callersMethod__reduce__
(self)
src/filelock/_error.py:11
↓ 1 callersMethod_acquire
If the file lock could be acquired, self._context.lock_file_fd holds the file descriptor of the lock file.
src/filelock/_api.py:391
↓ 1 callersMethod_acquire_reader_slot
( self, token: str, *, deadline: float | None, blocking: bool, )
src/filelock/_soft_rw/_sync.py:589
↓ 1 callersMethod_acquire_transaction_lock
(self, *, blocking: bool, timeout: float)
src/filelock/_read_write.py:161
↓ 1 callersMethod_acquire_writer_slot
( self, token: str, *, deadline: float | None, blocking: bool, )
src/filelock/_soft_rw/_sync.py:548
↓ 1 callersMethod_any_readers
(self)
src/filelock/_soft_rw/_sync.py:649
↓ 1 callersMethod_async_poll_until_acquired
( self, *, blocking: bool, cancel_check: Callable[[], bool] | None, ti
src/filelock/asyncio.py:273
↓ 1 callersMethod_break_stale_readers
(self, now: float)
src/filelock/_soft_rw/_sync.py:673
↓ 1 callersMethod_configure_and_begin
( self, mode: Literal["read", "write"], timeout: float, *, blocking: bool, start_time: float )
src/filelock/_read_write.py:189
↓ 1 callersMethod_do_acquire_inner
( self, mode: Literal["read", "write"], timeout: float, *, blocking: b
src/filelock/_read_write.py:239
↓ 1 callersMethod_do_acquire_inner
( self, mode: _Mode, effective_timeout: float, start: float, *,
src/filelock/_soft_rw/_sync.py:490
↓ 1 callersMethod_fallback_to_soft_lock
(self)
src/filelock/_unix.py:95
↓ 1 callersMethod_is_process_alive
(pid: int)
src/filelock/_soft.py:86
↓ 1 callersFunction_is_reparse_point
Check if a path is a reparse point (symlink, junction, etc.) on Windows. :param path: Path to check :returns: True if path
src/filelock/_windows.py:27
↓ 1 callersFunction_load_excluded_authors
()
tasks/changelog.py:63
↓ 1 callersMethod_poll_until_acquired
( self, *, blocking: bool, cancel_check: Callable[[], bool] | None, ti
src/filelock/_api.py:532
↓ 1 callersMethod_refresh_marker
(self)
src/filelock/_soft_rw/_sync.py:683
↓ 1 callersFunction_register_hooks
()
src/filelock/_soft_rw/_sync.py:917
↓ 1 callersMethod_release
Releases the lock and sets self._context.lock_file_fd to None.
src/filelock/_api.py:396
↓ 1 callersMethod_release
(self)
tests/test_async_filelock.py:173
↓ 1 callersMethod_reset_after_fork_in_child
(self)
src/filelock/_soft_rw/_sync.py:719
↓ 1 callersMethod_touch_writer_marker_if_ours
(self, token: str)
src/filelock/_soft_rw/_sync.py:413
↓ 1 callersMethod_try_break_stale_lock
(self)
src/filelock/_soft.py:58
↓ 1 callersMethod_windows_unlink_with_retry
(self)
src/filelock/_soft.py:187
↓ 1 callersMethod_write_lock_info
(fd: int)
src/filelock/_soft.py:136
↓ 1 callersFunction_write_stale_marker
(path: str, content: bytes)
tests/soft_rw/test_soft_rw_sync.py:727
↓ 1 callersMethodacquire
Try to acquire the file lock. :param timeout: maximum wait time for acquiring the lock, ``None`` means use the default :
src/filelock/asyncio.py:207
↓ 1 callersMethodacquire_read
Acquire a shared read lock. See :meth:`SoftReadWriteLock.acquire_read` for the full reentrancy / upgrade / fork semantics. The block
src/filelock/_soft_rw/_async.py:109
next →1–100 of 572, ranked by callers