Commit 1d13ec2d by Michael DeHaan

Construct the multiprocessing manager only once.

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