parallel Module (stx.parallel)
SciTeX Parallel — thread/process pool parallel execution utilities.
- scitex.parallel.run(func, args_list, n_jobs=-1, desc='Processing')[source]
Runs function in parallel using ThreadPoolExecutor with tuple arguments.
- Parameters:
- Returns:
Results of parallel execution
- Return type:
List[Any]
Examples
>>> def add(x, y): ... return x + y >>> args_list = [(1, 4), (2, 5), (3, 6)] >>> run(add, args_list) [5, 7, 9]