fluidimage.executors.base#
Base class for executors#
- class fluidimage.executors.base.ExecutorBase(topology, path_dir_result, nb_max_workers=None, nb_items_queue_max=None, logging_level='info', sleep_time=None, stop_if_error=False, path_log=None)[source]#
Bases:
ABC
Base class for executors.
- Parameters:
- topologyfluidimage.topology.base.TopologyBase
A computational topology.
- path_dir_resultstr or pathlib.Path
The path of the directory where the results have to be saved.
- nb_max_workersint, optional (None)
- nb_items_queue_maxint, optional (None),
- logging_levelstr, optional {“info”},
- sleep_timenumber, optional {None},
- stop_if_errorbool, optional {False}
- class fluidimage.executors.base.MultiExecutorBase(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:
ExecutorBase
Manage the multi-executor mode
This class is not the one whose really compute the topology. The topology is split and each slice is computed with an ExecutorAsync
- Parameters:
- nb_max_workersNone, int
Limits the numbers of workers working in the same time.
- nb_items_queue_maxNone, int
Limits the numbers of items that can be in a output_queue.
- sleep_timeNone, float
Defines the waiting time (from trio.sleep) of a function. Async functions await trio.sleep(sleep_time) when they have done a work on an item, and when there is nothing in their input_queue.
Classes
|
Base class for executors. |
|
Manage the multi-executor mode |