MCPcopy Create free account
hub / github.com/tox-dev/filelock / AsyncFileLockMeta

Class AsyncFileLockMeta

src/filelock/asyncio.py:75–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73
74
75class AsyncFileLockMeta(FileLockMeta):
76 def __call__( # ty: ignore[invalid-method-override] # noqa: PLR0913
77 cls: type[_AT], # noqa: N805
78 lock_file: str | os.PathLike[str],
79 timeout: float = -1,
80 mode: int = _UNSET_FILE_MODE,
81 thread_local: bool = False, # noqa: FBT001, FBT002
82 *,
83 blocking: bool = True,
84 is_singleton: bool = False,
85 poll_interval: float = 0.05,
86 lifetime: float | None = None,
87 loop: asyncio.AbstractEventLoop | None = None,
88 run_in_executor: bool = True,
89 executor: futures.Executor | None = None,
90 ) -> _AT:
91 if thread_local and run_in_executor:
92 msg = "run_in_executor is not supported when thread_local is True"
93 raise ValueError(msg)
94 return super().__call__(
95 lock_file=lock_file,
96 timeout=timeout,
97 mode=mode,
98 thread_local=thread_local,
99 blocking=blocking,
100 is_singleton=is_singleton,
101 poll_interval=poll_interval,
102 lifetime=lifetime,
103 loop=loop,
104 run_in_executor=run_in_executor,
105 executor=executor,
106 )
107
108
109class BaseAsyncFileLock(BaseFileLock, metaclass=AsyncFileLockMeta):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…