module documentation

Undocumented

Class _​Async​Io​Greenlet Undocumented
Class ​Async​Adapted​Lock Undocumented
Function ​_util​_async​_run for test suite/ util only
Function ​_util​_async​_run​_coroutine​_function for test suite/ util only
Function await​_fallback Awaits an async function in a sync method.
Function await​_only Awaits an async function in a sync method.
Function get​_event​_loop vendor asyncio.get_event_loop() for python 3.7 and above.
Async Function greenlet​_spawn Runs a sync function fn in a new greenlet.
Function is​_exit​_exception Undocumented
Variable ​_copy​_context Undocumented
def _util_async_run(fn, *args, **kwargs):
for test suite/ util only
def _util_async_run_coroutine_function(fn, *args, **kwargs):
for test suite/ util only
def await_fallback(awaitable):

Awaits an async function in a sync method.

The sync method must be inside a greenlet_spawn context. await_ calls cannot be nested.

Parameters
awaitable:CoroutineThe coroutine to call.
Returns
AnyUndocumented
def await_only(awaitable):

Awaits an async function in a sync method.

The sync method must be inside a greenlet_spawn context. await_ calls cannot be nested.

Parameters
awaitable:CoroutineThe coroutine to call.
Returns
AnyUndocumented
def get_event_loop():

vendor asyncio.get_event_loop() for python 3.7 and above.

Python 3.10 deprecates get_event_loop() as a standalone.

async def greenlet_spawn(fn, *args, _require_await=False, **kwargs):

Runs a sync function fn in a new greenlet.

The sync function can then use await_ to wait for async functions.

Parameters
fn:CallableThe sync callable to call.
*argsPositional arguments to pass to the fn callable.
​_require​_awaitUndocumented
**kwargsKeyword arguments to pass to the fn callable.
Returns
AnyUndocumented
def is_exit_exception(e):

Undocumented

_copy_context =

Undocumented