STINNER Victor added the comment:

> Doesn't that mean doing 3 operations (unregister(), register(), modify()) 
> instead of the current 2 (unregister(), register())? I don't see how it can 
> be faster than a single modify() syscall.

The idea is to reuse _BaseSelectorImpl.register() and 
_BaseSelectorImpl.unregister() to factorize the code. These methods don't use 
syscall, they create the SelectorKey object and update _fd_to_key. So each 
class doesn't have to redo these things.

I don't insist to redo what I did, I'm just trying to explain my change because 
your change basically copy/paste the same code 3 times, and you forgot 
KqueueSelector, so you even may have to copy it a 4th time ;-)

----------

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

Reply via email to