fmultiprocess (function)¶
- fundamentals.fmultiprocess(log, function, inputArray, poolSize=False, timeout=3600, turnOffMP=False, progressBar=False, mute=False, **kwargs)[source][source]¶
multiprocess pool
Key Arguments
log– loggerfunction– the function to multiprocessinputArray– the array to be iterated overpoolSize– limit the number of CPU that are used in multiprocess jobtimeout– time in sec after which to raise a timeout error if the processes have not completedturnOffMP– turn off multiprocessing. Useful for profiling and debugging. Default FalseprogressBar– add a progress barmute– mute terminal output from child processes
Return
resultArray– the array of results
Usage
```python from fundamentals import multiprocess # DEFINE AN INPUT ARRAY inputArray = range(10000) results = multiprocess(log=log, function=functionName, poolSize=10, timeout=300,
inputArray=inputArray, otherFunctionKeyword=”cheese”)