Message291273
> 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 ;-) |
|
Date |
User |
Action |
Args |
2017-04-07 13:24:04 | vstinner | set | recipients:
+ vstinner, gvanrossum, giampaolo.rodola, neologix, yselivanov |
2017-04-07 13:24:04 | vstinner | set | messageid: <1491571444.46.0.308524635419.issue30014@psf.upfronthosting.co.za> |
2017-04-07 13:24:04 | vstinner | link | issue30014 messages |
2017-04-07 13:24:04 | vstinner | create | |
|