anyio
Classes:
-
TaskFuture–A result that will be completed in the future by a task group.
Functions:
-
as_async_iterator–Create an asynchronous iterator from a synchronous iterator.
-
start_future–Start a future in a task group.
-
start_with_future–Start the given future in a task group.
TaskFuture
Bases: Generic[R]
A result that will be completed in the future by a task group.
Methods:
-
set_exception–Set the exception of the future.
-
set_value–Set the value of the future.
Attributes:
-
exception(BaseException | None) –Get the exception that caused the future to fail (if any).
-
value(R) –Get the result of a future.
exception
property
exception: BaseException | None
Get the exception that caused the future to fail (if any).
as_async_iterator
as_async_iterator(
task_group: TaskGroup,
sync_iter: Iterator[R],
*,
max_buffer_size: int = 0
) -> AbstractContextManager[MemoryObjectReceiveStream[R]]
Create an asynchronous iterator from a synchronous iterator.
Parameters: