> For the complete documentation index, see [llms.txt](https://pyot.iann838.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://pyot.iann838.com/utils/threading.md).

# Threading

Module: `pyot.utils.threading`

### *class* `AsyncLock`

> An asynchronous threading Lock. The event loop won't be blocked when acquiring the lock.

Definitions:

* `__aenter__` -> `bool`
  * `args`: `None`
* `__aexit__` -> `None`
  * `args`: `None`
* `__init__` -> `None`

Methods:

* *asyncmethod* `acquire` -> `bool`

  > Acquire the lock without locking the loop
* *method* `release` -> `None`

  > Release the lock, this is not async because it is immediate and useful for hooks (e.g. registering `atexit`)
