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

Method release

src/filelock/_async_read_write.py:140–151  ·  view source on GitHub ↗

Release one level of the current lock. See :meth:`ReadWriteLock.release` for full semantics. :param force: if ``True``, release the lock completely regardless of the current lock level :raises RuntimeError: if no lock is currently held and *force* is ``False``

(self, *, force: bool = False)

Source from the content-addressed store, hash-verified

138 return AsyncAcquireReadWriteReturnProxy(lock=self)
139
140 async def release(self, *, force: bool = False) -> None:
141 """
142 Release one level of the current lock.
143
144 See :meth:`ReadWriteLock.release` for full semantics.
145
146 :param force: if ``True``, release the lock completely regardless of the current lock level
147
148 :raises RuntimeError: if no lock is currently held and *force* is ``False``
149
150 """
151 await self._run(self._lock.release, force=force)
152
153 @asynccontextmanager
154 async def read_lock(self, timeout: float | None = None, *, blocking: bool | None = None) -> AsyncGenerator[None]:

Callers 12

read_lockMethod · 0.95
write_lockMethod · 0.95
test_reentrant_readFunction · 0.95
test_reentrant_writeFunction · 0.95
test_upgrade_prohibitedFunction · 0.95
test_release_forceFunction · 0.95
__aexit__Method · 0.45

Calls 1

_runMethod · 0.95

Tested by 9

test_reentrant_readFunction · 0.76
test_reentrant_writeFunction · 0.76
test_upgrade_prohibitedFunction · 0.76
test_release_forceFunction · 0.76