[Twisted-Python] twisted run out of file descriptors
Bob Ippolito
bob at redivi.com
Tue Oct 26 11:47:14 EDT 2004
On Oct 26, 2004, at 11:31, Glyph Lefkowitz wrote:
> On Tue, 2004-10-26 at 01:35 -0700, Alec Matusis wrote:
>> I thought it would be faster with select() rather than poll() - lower
>> load
>> on the machine?
>
> Sounds like you might be confused - if someone had told you that
> select() is faster than *polling*, that would be accurate - the
> terminology is confusing because "polling" means "repeatedly checking
> for input in a busy-loop". In this context, "polling" is actually the
> opposite of "calling poll()".
>
> poll() is simply a better version of select(). The only reason it is
> not the default reactor is that there are some obscure places where
> select() exists and it does not. I am not sure if this is even
> relevant
> any more, since I don't know if any such place can build recent
> versions
> of Python.
Mac OS X prior to 10.3 does not ship with an implementation of poll.
Mac OS X 10.3 has an implementation of poll, but it is a wrapper for
select.
#ifndef POLL_NO_WARN
#warning "poll() functionality for Mac OS X is implemented via an
emulation layer on top of select(), not in the kernel directly. It is
recommended that programs running under OS X 10.3 prefer select() over
poll(). Configure scripts should look for the _POLL_EMUL_H_ define
(instead of _POLL_H_ or _SYS_POLL_H_) and avoid implementations where
poll is not implemented in the kernel."
#endif
-bob
More information about the Twisted-Python
mailing list