From 6370898b2ff060b5467aaf99175c5ef648820607 Mon Sep 17 00:00:00 2001 From: Nelson Minar Date: Mon, 19 Jan 2015 17:36:41 +0000 Subject: [PATCH] Don't set maxtasksperchild in the pool. This seems to fix an idle worker problem, see issue #51 --- openaddr/jobs.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openaddr/jobs.py b/openaddr/jobs.py index bf3cddfd..e3e7e69f 100644 --- a/openaddr/jobs.py +++ b/openaddr/jobs.py @@ -99,8 +99,8 @@ def run_all_process_ones(source_files, destination, source_extras): # Result collection object results = OrderedDict() - # Set up a pool to run our jobs, new process for each task - pool = multiprocessing.Pool(processes=thread_count, maxtasksperchild=1) + # Set up a pool to run our jobs. (don't use maxtasksperchild, causes problems.) + pool = multiprocessing.Pool(processes=thread_count) # Start the tasks. Results can arrive out of order. _L.info("Running tasks in pool with %d processes", thread_count)