释放锁。
(fd: int)
| 46 | |
| 47 | |
| 48 | def _unlock(fd: int) -> None: |
| 49 | """释放锁。""" |
| 50 | if _IS_WINDOWS: |
| 51 | try: |
| 52 | msvcrt.locking(fd, msvcrt.LK_UNLCK, 1) |
| 53 | except OSError: |
| 54 | pass |
| 55 | else: |
| 56 | fcntl.flock(fd, fcntl.LOCK_UN) |
| 57 | |
| 58 | |
| 59 | def _lock_path(path: pathlib.Path) -> pathlib.Path: |
no outgoing calls
no test coverage detected