fluidimage.executors.exec_async_multiproc#

Executor async/await + multiprocessing#

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, path_log=None)[source]#

Bases: ExecutorAsync

Async executor using multiprocessing to launch CPU-bounded tasks

async async_run_work_cpu(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

Functions

exec_work_and_comm(func, obj, child_conn, event)

Classes

Executor

alias of ExecutorAsyncMultiproc

ExecutorAsyncMultiproc(topology, path_dir_result)

Async executor using multiprocessing to launch CPU-bounded tasks