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¶
Run a coroutine in the application configured event loop. The Ice run time will call this method to run coroutines returned by async dispatch methods. This method 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.Future so that it can be awaited in the application event loop. The Ice run time calls this method 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