diff options
Diffstat (limited to 'python2/futures/process.py')
-rw-r--r-- | python2/futures/process.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/python2/futures/process.py b/python2/futures/process.py index e4c3ad3..fdea346 100644 --- a/python2/futures/process.py +++ b/python2/futures/process.py @@ -17,6 +17,7 @@ import weakref _thread_references = set() _shutdown = False +EXTRA_QUEUED_CALLS = 1 def _python_exit(): global _shutdown @@ -144,7 +145,8 @@ class ProcessPoolExecutor(Executor): # Make the call queue slightly larger than the number of processes to # prevent the worker processes from starving but to make future.cancel() # responsive. - self._call_queue = multiprocessing.Queue(self._max_processes + 1) + self._call_queue = multiprocessing.Queue(self._max_processes + + EXTRA_QUEUED_CALLS) self._result_queue = multiprocessing.Queue() self._work_ids = Queue.Queue() self._queue_management_thread = None |