Unlock. The first coroutine in line waiting for `acquire` gets the lock. If not locked, raise a `RuntimeError`.
(self)
| 538 | return self._block.acquire(timeout) |
| 539 | |
| 540 | def release(self) -> None: |
| 541 | """Unlock. |
| 542 | |
| 543 | The first coroutine in line waiting for `acquire` gets the lock. |
| 544 | |
| 545 | If not locked, raise a `RuntimeError`. |
| 546 | """ |
| 547 | try: |
| 548 | self._block.release() |
| 549 | except ValueError: |
| 550 | raise RuntimeError("release unlocked lock") |
| 551 | |
| 552 | def __enter__(self) -> None: |
| 553 | raise RuntimeError("Use `async with` instead of `with` for Lock") |
no outgoing calls