betty.asyncio module¶
Provide asynchronous programming utilities.
- final class betty.asyncio.LazyReAwaitable¶
Bases:
ReAwaitable,GenericA value that can be awaited multiple times while always returning the exact same value.
The proxied awaitable will at most be awaited once.
This is thread-safe, which means you can safely use this between different threads.
- __init__(factory: Callable[[], Awaitable[ValueT]], /)¶
- async betty.asyncio.resolve_await(value: ResolvableAwaitable) T¶
Return a value, but await it first if it is awaitable.