[issue10527] multiprocessing.Pipe problem: "handle out of range in select()"

Antoine Pitrou report at bugs.python.org
Mon Oct 22 20:41:40 CEST 2012


Antoine Pitrou added the comment:

> Using poll() by default is controversial for 2 reasons, I think:
> 
> #1 - a certain slowdown is likely to be introduced (I'll measure it)

That sounds like premature optimization. If you are concerned about that
you could add some caching of the poll object.

> #2 - current wait() implementation allows to specify a list of file
> descriptors and/or Connections objects. 
> select() can deal with both while poll() does not (it will return a
> list of integers rather than a list of Connection instances).

Well, can't you just create a mapping of the fds to the objects?

Your patch already has that problem by the way, and it's even worse
since it will trigger in random conditions (when some fd is > 512).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10527>
_______________________________________


More information about the Python-bugs-list mailing list