Ice.EventLoopAdapter¶
- class Ice.EventLoopAdapter¶
Bases:
ABCAn adapter that allows applications to execute asynchronous code in a custom event loop.
- abstractmethod runCoroutine(coroutine: Coroutine) FutureLike¶
Runs a coroutine in the application-configured event loop. The Ice run time will call this function to run coroutines returned by async dispatch methods. This function is called from the Ice dispatch thread.
- Parameters:
coroutine (Coroutine) – The coroutine to run.
- Returns:
A Future-like object that can be used to wait for the completion of the coroutine.
- Return type:
- abstractmethod wrapFuture(future: Future) Awaitable¶
Wraps an
Ice.Futureso that it can be awaited in the application event loop. The Ice run time calls this function before returning a future to the application.- Parameters:
future (Ice.Future) – The future to wrap.
- Returns:
An awaitable object that can be awaited in the application event loop.
- Return type:
Awaitable