resolve_awaitable

Resolves an awaitable object and calls a callback with the resolved value.

Signature:

def resolve_awaitable(awaitable: Awaitable[_T], callback: Callable[[_T], _R]) -> _R:
...

Parameters:

  1. awaitable:

    Type
    Awaitable[_T]
  2. callback:

    Type
    Callable[[_T], _R]