fmultiprocess (function) ∞
-
fmultiprocess
(log, function, inputArray, poolSize=False, timeout=3600, turnOffMP=False, **kwargs)[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 False
Return
resultArray
– the array of results
Usage
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")