fluidimage.executors.exec_async_sequential#

Executor async/await sequential#

A executor using async for IO but launching CPU-bounded tasks sequentially.

class fluidimage.executors.exec_async_sequential.ExecutorAsyncSequential(topology, path_dir_result, nb_max_workers=None, nb_items_queue_max=None, sleep_time=0.01, logging_level='info', stop_if_error=False, path_log=None)[source]#

Bases: ExecutorAsync

Async executor launching CPU-bounded tasks sequentially

async async_run_work_cpu(work)[source]#

Executes the work on an item (key, obj), and add the result on work.output_queue.

Parameters:
work

A work from the topology

keyhashable

The key of the dictionary item to be process

objobject

The value of the dictionary item to be process

Classes

Executor

alias of ExecutorAsyncSequential

ExecutorAsyncSequential(topology, ...[, ...])

Async executor launching CPU-bounded tasks sequentially