Acquire an exclusive write lock. See :meth:`ReadWriteLock.acquire_write` for full semantics. :param timeout: maximum wait time in seconds; ``-1`` means block indefinitely :param blocking: if ``False``, raise :class:`~filelock.Timeout` immediately when the lock is u
(self, timeout: float = -1, *, blocking: bool = True)
| 120 | return AsyncAcquireReadWriteReturnProxy(lock=self) |
| 121 | |
| 122 | async def acquire_write(self, timeout: float = -1, *, blocking: bool = True) -> AsyncAcquireReadWriteReturnProxy: |
| 123 | """ |
| 124 | Acquire an exclusive write lock. |
| 125 | |
| 126 | See :meth:`ReadWriteLock.acquire_write` for full semantics. |
| 127 | |
| 128 | :param timeout: maximum wait time in seconds; ``-1`` means block indefinitely |
| 129 | :param blocking: if ``False``, raise :class:`~filelock.Timeout` immediately when the lock is unavailable |
| 130 | |
| 131 | :returns: a proxy that can be used as an async context manager to release the lock |
| 132 | |
| 133 | :raises RuntimeError: if a read lock is already held, or a write lock is held by a different thread |
| 134 | :raises Timeout: if the lock cannot be acquired within *timeout* seconds |
| 135 | |
| 136 | """ |
| 137 | await self._run(self._lock.acquire_write, timeout, blocking=blocking) |
| 138 | return AsyncAcquireReadWriteReturnProxy(lock=self) |
| 139 | |
| 140 | async def release(self, *, force: bool = False) -> None: |
| 141 | """ |