Executor
This package is used to manage tasks in multithreaded and distributed computing environments.
Thread Executor
Implementation using the standard ThreadPoolExecutor. The max_workers parameter specifies the maximum number of threads to be created. Its default value os.cpu_count.
from executor.impl import ThreadExecutor
executor = ThreadExecutor(
max_workers: Optional[int]
)
Process Executor
Implementation using the standard ProcessPoolExecutor. The max_workers parameter specifies the maximum number of processes to be created. Its default value os.cpu_count.
from executor.impl import ProcessExecutor
executor = ProcessExecutor(
max_workers: Optional[int]
)
MPI Executor
Implementation for distributed computing through Message Passing Interface (MPI) using the MPIPoolExecutor from mpi4py library. Automatically determines the number of resources that were allocated at startup.
from executor.impl import MPIExecutor
executor = MPIExecutor()