Commit ebcd92c9 authored by sumpfralle's avatar sumpfralle

added warning output if multiprocessing was requested but it is not available


git-svn-id: https://pycam.svn.sourceforge.net/svnroot/pycam/trunk@749 bbaffbd6-741e-11dd-a85d-61de82d9cad9
parent 17e0e4b6
......@@ -74,6 +74,22 @@ def init_threading(number_of_processes=None, enable_server=False, remote=None, r
mp_is_available = False
if not mp_is_available:
__multiprocessing = False
# Maybe a multiprocessing feature was explicitely requested?
# Issue some warnings if necessary.
multiprocessing_missing_text = "Failed to enable server mode due to " \
+ "a lack of 'multiprocessing' capabilities. Please use " \
+ "Python2.6 or install the 'python-multiprocessing' package."
if enable_server:
log.warn("Failed to enable server mode due to a lack of " \
+ "'multiprocessing' capabilities. " \
+ multiprocessing_missing_text)
elif run_server:
log.warn("Failed to run in server-only mode due to a lack of " \
+ "'multiprocessing' capabilities. " \
+ multiprocessing_missing_text)
else:
# no further warnings required
pass
else:
if number_of_processes is None:
# use defaults
......
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