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

Method __init__

src/filelock/_async_read_write.py:60–73  ·  view source on GitHub ↗
(  # noqa: PLR0913
        self,
        lock_file: str | os.PathLike[str],
        timeout: float = -1,
        *,
        blocking: bool = True,
        is_singleton: bool = True,
        loop: asyncio.AbstractEventLoop | None = None,
        executor: futures.Executor | None = None,
    )

Source from the content-addressed store, hash-verified

58 """
59
60 def __init__( # noqa: PLR0913
61 self,
62 lock_file: str | os.PathLike[str],
63 timeout: float = -1,
64 *,
65 blocking: bool = True,
66 is_singleton: bool = True,
67 loop: asyncio.AbstractEventLoop | None = None,
68 executor: futures.Executor | None = None,
69 ) -> None:
70 self._lock = ReadWriteLock(lock_file, timeout, blocking=blocking, is_singleton=is_singleton)
71 self._loop = loop
72 self._owns_executor = executor is None
73 self._executor = executor or ThreadPoolExecutor(max_workers=1)
74
75 @property
76 def lock_file(self) -> str:

Callers

nothing calls this directly

Calls 1

ReadWriteLockClass · 0.85

Tested by

no test coverage detected