fluidimage.executors.exec_async_sequential

Executor async/await sequential (fluidimage.executors.exec_async_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)[source]

Bases: fluidimage.executors.exec_async.ExecutorAsync

Async executor launching CPU-bounded tasks sequentially

async async_run_work_cpu(self, 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 dictionnary item to be process

objobject

The value of the dictionnary item to be process

Classes

ExecutorAsyncSequential(topology, …[, …])

Async executor launching CPU-bounded tasks sequentially