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

Method _release

src/filelock/_windows.py:42–49  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

40 self._context.lock_file_fd = fd
41
42 def _release(self) -> None:
43 fd = cast(int, self._context.lock_file_fd)
44 self._context.lock_file_fd = None
45 msvcrt.locking(fd, msvcrt.LK_UNLCK, 1)
46 os.close(fd)
47
48 with suppress(OSError): # Probably another instance of the application hat acquired the file lock.
49 Path(self.lock_file).unlink()
50
51else: # pragma: win32 no cover
52

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected