fusionsc.asnc

Asynchronous processing (promises, coroutines)

Functions

stopEventLoop()

Stops the event loop on this thread if it is active.

hasEventLoop()

Checks whether this thread has an active event loop

wait(awaitable)

Awaits a coroutine result by running the coroutine on the main event loop.

asyncFunction(f)

Asynchronous Function

Classes

Future

AsyncIO-style future

FiberPool

Despite python's extensive support for coroutines, it can sometimes be neccessary to use the blocking Promise.wait(...) function inside a coroutine (e.g.

Functions

fusionsc.asnc.stopEventLoop() None

Stops the event loop on this thread if it is active.

fusionsc.asnc.hasEventLoop() bool

Checks whether this thread has an active event loop

fusionsc.asnc.wait(awaitable: Awaitable[T]) T

Awaits a coroutine result by running the coroutine on the main event loop.

fusionsc.asnc.asyncFunction(f: Callable[[P], Awaitable[T]]) Callable[[P], T]

Asynchronous Function

Wraps a coroutine or promise function as a usual eagerly evaluate function. The asynchronous function can still be accessed using the async property.