> 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/sync.md).

# Sync

Module: `pyot.utils.sync`

### *function* `async_to_sync` -> `Callable[..., ~R]`

* `func`: `Callable[..., Awaitable[~R]]`

> Wraps `asyncio.run` on an async function converting it into a blocking function. Can be used as decorator @async\_to\_sync

### *function* `sync_to_async` -> `Callable[..., Awaitable[~R]]`

* `func`: `Callable[..., ~R]`

> Wraps `asyncio.get_event_loop().run_in_executor` on a blocking function converting it into a Future. Can be used as decorator @sync\_to\_async
