class documentation

An AsyncDriver is an interface to a library that supports awaitables (such as the standard library asyncio), to allow fritter.repeat.Async to return an awaitable of a library-appropriate type.

Method complete The asynchronous operation described by a previous call to this AsyncDriver's newWithCancel method completed successfully; un-suspend any coroutine awaiting it.
Method newWithCancel Create a new future-ish object with the given callback to execute when it is cancelled.
Method runAsync Run the given coroutine which awaits upon AsyncType.
def complete(self, asyncObj: AsyncType): (source)

The asynchronous operation described by a previous call to this AsyncDriver's newWithCancel method completed successfully; un-suspend any coroutine awaiting it.

def newWithCancel(self, cancel: Callable[[], None]) -> AsyncType: (source)

Create a new future-ish object with the given callback to execute when it is cancelled.

def runAsync(self, coroutine: Coroutine[AsyncType, Any, Any]) -> AsyncType: (source)

Run the given coroutine which awaits upon AsyncType.

Note
Whether this starts the given coroutine synchronously or waits until the next event-loop tick is implementation-defined.