Skip to content
This repository has been archived by the owner on May 5, 2022. It is now read-only.

Commit

Permalink
Don't set maxtasksperchild in the pool.
Browse files Browse the repository at this point in the history
This seems to fix an idle worker problem, see issue #51
  • Loading branch information
NelsonMinar committed Jan 19, 2015
1 parent 17da307 commit 6370898
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions openaddr/jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 6370898

Please sign in to comment.