未验证 提交 1e395f8a 编写于 作者: K Kaipeng Deng 提交者: GitHub

disable multiprocess on Windows (#181)

上级 36d1bc7b
......@@ -65,6 +65,10 @@ class ParallelMap(object):
self._worker_num = worker_num
self._bufsize = bufsize
self._use_process = use_process
if self._use_process and sys.platform == "win32":
logger.info("Use multi-thread reader instead of "
"multi-process reader on Windows.")
self._use_process = False
if self._use_process and type(memsize) is str:
assert memsize[-1].lower() == 'g', \
"invalid param for memsize[%s], should be ended with 'G' or 'g'" % (memsize)
......@@ -86,10 +90,6 @@ class ParallelMap(object):
def _setup(self):
"""setup input/output queues and workers """
use_process = self._use_process
if use_process and sys.platform == "win32":
logger.info("Use multi-thread reader instead of "
"multi-process reader on Windows.")
use_process = False
bufsize = self._bufsize
if use_process:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册