fluidimage.executors.exec_async_multiproc

Executor async/await + multiprocessing (fluidimage.executors.exec_async_multiproc)

A executor using async for IO and multiprocessing for CPU bounded tasks.

class fluidimage.executors.exec_async_multiproc.ExecutorAsyncMultiproc(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 using multiprocessing to launch CPU-bounded tasks

async async_run_work_cpu(self, work)[source]

Is destined to be started with a “trio.start_soon”.

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

Parameters
work :

A work from the topology

Classes

ExecutorAsyncMultiproc(topology, path_dir_result)

Async executor using multiprocessing to launch CPU-bounded tasks