Construct the multiprocessing manager only once.

pull/3809/merge
Michael DeHaan 11 years ago
parent ceff3b6ba3
commit 1d13ec2da3

@ -54,6 +54,7 @@ multiprocessing_runner = None
OUTPUT_LOCKFILE = tempfile.TemporaryFile()
PROCESS_LOCKFILE = tempfile.TemporaryFile()
MULTIPROCESSING_MANAGER = multiprocessing.Manager()
################################################
@ -813,7 +814,7 @@ class Runner(object):
def _parallel_exec(self, hosts):
''' handles mulitprocessing when more than 1 fork is required '''
manager = multiprocessing.Manager()
manager = MULTIPROCESSING_MANAGER
job_queue = manager.Queue()
for host in hosts:
job_queue.put(host)

Loading…
Cancel
Save