add switch to use multiprocessing
The user can specify with
use_multiprocessing=Trueif he intends to use the power of multiprocessing (recommended for smaller data or on large computing systems) or the serial preprocessing (recommended on small systems or when using debug mode).
Multiprocessing should be disabled in general in DEBUG mode.Add a 2nd parameter
use_multiprocessing_on_debugthat is used in debug mode.
To check if running in DEBUG mode use:
import sys if sys.gettrace() is None: debug = False else: debug = True
Change of issue's objectives:
- mutltiprocessing shouldn't be disabled on debug. otherwise parallel parts of the code cannot be debugged. Therefore add a 2nd parameter that is used in debug mode.