[issue35517] selector.EpollSelector: add new parameter to support EPOLLEXCLUSIVE

Manjusaka report at bugs.python.org
Mon Dec 17 14:06:17 EST 2018


Manjusaka <lizheao940510 at gmail.com> added the comment:

Actually, in my implementation, it also supports POLL with the different event.

I don't think to make selector be a public property is a good idea. It will break the whole system integrity.

Please think about it, if people want to use epoll/poll with some special event, they must use it like this.

>  s = selectors.EpollSelector()
>  s.selector.register(fd,select.EPOLLIN | select.EPOLLEXCLUSIVE)
>  s.selector.modify(fd,select.EPOLLOU | select.EPOLLEXCLUSIVE)

Here's a question, why we support the register?

I think it will make people don't care about the detail.

So, as you say, it's a little bit complicated, but it will help people don't care about the selector property detail, they just use the argument when they want to use it.

I think it's worth it.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35517>
_______________________________________


More information about the Python-bugs-list mailing list