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

Charles-François Natali report at bugs.python.org
Tue Oct 23 09:38:30 CEST 2012


Charles-François Natali added the comment:

>> This problem affects any single use of select(): instead of using an
>> ad-hoc wrapper in each module, it would probably make sense to add a
>> higher level selector class to the select module which would fallback on
>> the right syscall (i.e. poll() if available, or /dev/poll on Solaris-
>> like).
>
> Doesn't Solaris have poll()?  If so then I don't see why one would want to use /dev/poll in the single fd case.

Because it offers better performance than poll(): you don't have to
keep passing the FD at each syscall (note that I'm not talking about
the signal FD case, but about a generic polling API).

Also note that microbenchmarks with one FD isn't really meaningful,
since in real life the FD won't be ready at least part of the time:
like Antoine, I think that worrying about performance impact is really
a premature optimization (unless real benchmarks prove otherwise).

----------

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


More information about the Python-bugs-list mailing list