class documentation

class SyncronizerInterface(Protocol): (source)

View In Hierarchy

Define objects that run awaitables synchronously.

run_sync runs an awaitable on the object's event loop. It blocks the caller until the awaitable is complete.

Method run_sync Run awaitable to completion and return its result.
def run_sync(self, awaitable: Awaitable[T], timeout: float | None = None) -> T: (source) ΒΆ

Run awaitable to completion and return its result.

Parameters
awaitable:Awaitable[T]The awaitable to execute on the synchronizer's loop.
timeout:float | NoneOptional wall-clock timeout in seconds.
Returns
TThe result of the awaitable.