Giampaolo Rodola' added the comment:

Follows a couple of minor concerns.

- What about Solaris' /dev/poll?

- I'm not sure why in case of EINTR you retry with a different timeout; can't 
you just return []? 

- this is probably because I'm paranoid about performances but given that 
select() method will be called repeatedly I would not use a decorator. Also, 
similarly to what has been done elsewhere in the stdlib, for "critical" parts I 
would recommend localizing variable access in order to minimize overhead as in:

    def select(self, timeout=None):
        ... 
        key_from_fd = self._key_from_fd
        ready_append = ready.append
        for fd in r | w:
            ...
            key = key_from_fd(fd)
            if key:
                ready_append((key, events & key.events))

----------

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

Reply via email to