def _body(self, i, target, args):
"""
Executes the given function in its own process group (on Windows: in
its own process).
:param i: The index of the current configuration.
:param target: The function to run in parallel.
:param args: The arguments that the target should run with.
"""
if not is_windows:
os.setpgrp()
try:
if not target(*args):
self._break.value = 1
except:
logger.warning('', exc_info=True)
self._break.value = 1
self._slots[i] = 0
with self._lock:
self._lock.notify()
评论列表
文章目录