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

Method close

src/filelock/_async_read_write.py:195–204  ·  view source on GitHub ↗

Release the lock (if held) and close the underlying SQLite connection. After calling this method, the lock instance is no longer usable.

(self)

Source from the content-addressed store, hash-verified

193 await self.release()
194
195 async def close(self) -> None:
196 """
197 Release the lock (if held) and close the underlying SQLite connection.
198
199 After calling this method, the lock instance is no longer usable.
200
201 """
202 await self._run(self._lock.close)
203 if self._owns_executor:
204 self._executor.shutdown(wait=False)
205
206 def __del__(self) -> None:
207 # Safety net: if close() was never called, still shut down the executor we created so its worker thread does

Calls 1

_runMethod · 0.95

Tested by 4

test_closeFunction · 0.76