Attempt to lock. Returns an awaitable. Returns an awaitable, which raises `tornado.util.TimeoutError` after a timeout.
(
self, timeout: Optional[Union[float, datetime.timedelta]] = None
)
| 528 | return "<%s _block=%s>" % (self.__class__.__name__, self._block) |
| 529 | |
| 530 | def acquire( |
| 531 | self, timeout: Optional[Union[float, datetime.timedelta]] = None |
| 532 | ) -> Awaitable[_ReleasingContextManager]: |
| 533 | """Attempt to lock. Returns an awaitable. |
| 534 | |
| 535 | Returns an awaitable, which raises `tornado.util.TimeoutError` after a |
| 536 | timeout. |
| 537 | """ |
| 538 | return self._block.acquire(timeout) |
| 539 | |
| 540 | def release(self) -> None: |
| 541 | """Unlock. |
no outgoing calls