[Python-Dev] epoll implementation
"Martin v. Löwis"
martin at v.loewis.de
Sat May 27 10:00:49 CEST 2006
Ross Cohen wrote:
> The first thing any user of the poll interface does with the file descriptor
> is map it to some state object. That's where the lookup can be saved, the
> object can just be handed back directly. Problem being that when the fd is
> unregistered, we won't get back the PyObject pointer so can't decrement
> the refcount, has to be stored and looked up manually.
Ah. That would be an interface change; I would not do that. The lookup
is usually-constant and very fast. It is complexity that grows with the
number of file descriptors that these APIs worry about.
Regards,
Martin
More information about the Python-Dev
mailing list