New submission from Manjusaka <lizheao940...@gmail.com>:
Add a keyword argument for selector.EpollSelector with default value. This can help people use the EPOLLEXCLUSIVE since Python 3.7 and Linux Kernel 4.5 to avoid the herd effect like this def register(self, fileobj, events, data=None, exclusive=False): key = super().register(fileobj, events, data) epoll_events = 0 if events & EVENT_READ: epoll_events |= select.EPOLLIN if events & EVENT_WRITE: epoll_events |= select.EPOLLOUT try: if exclusive and hasattr(select, "EPOLLEXCLUSIVE"): epoll_events |= select.EPOLLEXCLUSIVE self._epoll.register(key.fd, epoll_events) except BaseException: super().unregister(fileobj) raise return key ---------- components: Library (Lib) messages: 331969 nosy: Manjusaka priority: normal severity: normal status: open title: enhhance for selector.EpollSelector type: enhancement versions: Python 3.7, Python 3.8 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue35517> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com