Commit bcb32b11 authored by Lars Kruse's avatar Lars Kruse

disable multiprocessing in debug mode

This is a useful feature for debugging path generator exceptions. Otherwise
the exception's backtraces are concealed by multiprocessing function calls.
parent e6861f78
...@@ -79,6 +79,10 @@ __issued_warnings = [] ...@@ -79,6 +79,10 @@ __issued_warnings = []
def run_in_parallel(*args, **kwargs): def run_in_parallel(*args, **kwargs):
global __manager global __manager
if __manager is None: if __manager is None:
if pycam.Utils.log.is_debug():
# force serial processing in debug mode
kwargs = dict(kwargs)
kwargs["disable_multiprocessing"] = True
return run_in_parallel_local(*args, **kwargs) return run_in_parallel_local(*args, **kwargs)
else: else:
return run_in_parallel_remote(*args, **kwargs) return run_in_parallel_remote(*args, **kwargs)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment