This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author diogocp
Recipients diogocp, paul.moore, steve.dower, tim.golden, zach.ware
Date 2016-05-01.20:45:37
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I'm using Python 3.5.1 x86-64 on Windows Server 2008 R2. Trying to run the ProcessPoolExecutor example [1] generates this exception:

Exception in thread Thread-1:
Traceback (most recent call last):
  File "C:\Program Files\Python35\lib\", line 914, in _bootstrap_inner
  File "C:\Program Files\Python35\lib\", line 862, in run
    self._target(*self._args, **self._kwargs)
  File "C:\Program Files\Python35\lib\concurrent\futures\", line 270, in _queue_management_worker
    ready = wait([reader] + sentinels)
  File "C:\Program Files\Python35\lib\multiprocessing\", line 859, in wait
    ready_handles = _exhaustive_wait(waithandle_to_obj.keys(), timeout)
  File "C:\Program Files\Python35\lib\multiprocessing\", line 791, in _exhaustive_wait
    res = _winapi.WaitForMultipleObjects(L, False, timeout)
ValueError: need at most 63 handles, got a sequence of length 64

The problem seems to be related to the value of the Windows constant MAXIMUM_WAIT_OBJECTS (see [2]), which is 64. This machine has 64 logical cores, so ProcessPoolExecutor defaults to 64 workers.

Lowering max_workers to 63 or 62 still results in the same exception, but max_workers=61 works fine.

Date User Action Args
2016-05-01 20:45:38diogocpsetrecipients: + diogocp, paul.moore, tim.golden, zach.ware, steve.dower
2016-05-01 20:45:38diogocpsetmessageid: <>
2016-05-01 20:45:38diogocplinkissue26903 messages
2016-05-01 20:45:37diogocpcreate