![]() |
Ensures given work is executing, and exposes it in completion order.
cirq.work.work_pool.CompletionOrderedAsyncWorkPool(
loop: Optional[asyncio.AbstractEventLoop] = None
)
Attributes | |
---|---|
num_active
|
The amount of work in the pool that has not completed. |
num_uncollected
|
The amount of work still in the pool that has completed. |
Methods
async_all_done
async_all_done() -> Awaitable[None]
An awaitable that completes once all work is completed.
include_work
include_work(
work: Union[Awaitable, asyncio.Future]
) -> None
Adds asynchronous work into the pool and begins executing it.
set_all_work_received_flag
set_all_work_received_flag() -> None
Indicates to the work pool that no more work will be added.