Giampaolo Rodola' added the comment:

> Do you mean at the C level?

No, Python of course.

> poll(), unlike select(), does not have to scan an fd_set 
> (of 1024 bits?) so I would have expected it to be faster if anything.

That might be true in a continuous loop (e.g. a reactor).
Judging from where this is supposed to take place 
(http://hg.python.org/cpython/file/f6fcff683866/Lib/multiprocessing/connection.py#l865)
 what you would end up doing within the wait() function is:

- init_pollster()
- register(fd) * num of fds
- unregister(fd) * num of fds
- close_pollster()

...and I suspect that's likely to be slower than just using select(), even if 
you cache the poll object. Anyway, I might be wrong, and figuring that out with 
a simple benchmark is easy.
Other than that I'm not sure how often wait() gets called usually so even if a 
slowdown is introduced that might not even be a problem.

----------

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

Reply via email to