Steve Dower added the comment:

> Some quick Googling strongly suggests there's no reasonably general way to 
> overcome the Windows-defined MAXIMUM_WAIT_OBJECTS=64 for implementations that 
> call the Windows WaitForMultipleObjects().

The recommended way to deal with this is to spin up threads to do the wait 
(which sounds horribly inefficient, but threads on Windows are cheap, 
especially if they are waiting on kernel objects), and then wait on each thread.

Personally I think it'd be fine to make the _winapi module do that 
transparently for WaitForMultipleObjects, as it's complicated to get right (you 
need to ensure you map back to the original handle, timeouts and cancellation 
get complicated, there are real race conditions (mainly for auto-reset events), 
etc.), but in all circumstances it's better than just failing immediately. 
Handling it within multiprocessing isn't a bad idea, but won't help other users.

I'd love to write the code to do it, but I doubt I'll get time (especially 
since I'm missing the PyCon US sprints this year). Happy to help someone else 
through it. We're going to see Python being used on more and more multicore 
systems over time, where this will become a genuine issue.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue26903>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to