Commit ea525564 authored by Yuxin Wu's avatar Yuxin Wu

fix for latest flake8

parent 610ffe3f
...@@ -231,10 +231,11 @@ def start_proc_mask_signal(proc): ...@@ -231,10 +231,11 @@ def start_proc_mask_signal(proc):
for p in proc: for p in proc:
if isinstance(p, mp.Process): if isinstance(p, mp.Process):
if sys.version_info < (3, 4) or mp.get_start_method() == 'fork': if sys.version_info < (3, 4) or mp.get_start_method() == 'fork':
log_once( log_once("""
"Starting a process with 'fork' method is not safe and may consume unnecessary extra CPU memory." Starting a process with 'fork' method is not safe and may consume unnecessary extra CPU memory.
" Use 'forkserver' or 'spawn' method (available after Py3.4) instead if you run into any issues. " Use 'forkserver' or 'spawn' method (available after Py3.4) instead if you run into any issues.
"See https://docs.python.org/3/library/multiprocessing.html#contexts-and-start-methods on how to set them.", See https://docs.python.org/3/library/multiprocessing.html#contexts-and-start-methods on how to set them.
""".replace("\n", ""),
'warn') # noqa 'warn') # noqa
p.start() p.start()
......
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