Release the lock. :param exc_type: the exception type if raised :param exc_value: the exception value if raised :param traceback: the exception traceback if raised
(
self,
exc_type: type[BaseException] | None,
exc_value: BaseException | None,
traceback: TracebackType | None,
)
| 355 | return self |
| 356 | |
| 357 | async def __aexit__( |
| 358 | self, |
| 359 | exc_type: type[BaseException] | None, |
| 360 | exc_value: BaseException | None, |
| 361 | traceback: TracebackType | None, |
| 362 | ) -> None: |
| 363 | """ |
| 364 | Release the lock. |
| 365 | |
| 366 | :param exc_type: the exception type if raised |
| 367 | :param exc_value: the exception value if raised |
| 368 | :param traceback: the exception traceback if raised |
| 369 | |
| 370 | """ |
| 371 | await self.release() |
| 372 | |
| 373 | def __del__(self) -> None: |
| 374 | """Release on deletion — safe to call during GC even when no event loop is running.""" |