Concurrency¶
This page documents the concurrency utilities provided by Skarv.
Coroutine Scheduling¶
skarv.concurrency.schedule_coroutine(coro: Awaitable) -> asyncio.Future
¶
Schedule a coroutine to run in a background asyncio event loop.
If the background event loop is not running, it will be started in a new thread.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
coro
|
Awaitable
|
The coroutine to schedule. |
required |
Returns:
Type | Description |
---|---|
Future
|
asyncio.Future: A Future representing the execution of the coroutine. |