bundles / jupyter_core latest / jupyter_core / utils / ensure_async
function
jupyter_core.utils:ensure_async
Signature
async def ensure_async(obj: Awaitable[T] | T) → TSummary
Convert a non-awaitable object to a coroutine if needed, and await it if it was not already awaited.
Extended Summary
This function is meant to be called on the result of calling a function, when that function could either be asynchronous or not.
Aliases
jupyter_core.utils.ensure_async