Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #103695 > unrolled thread

why not define a EVENT_ERROR in selectors module?

Started bygansteed <gansteed@gmail.com>
First post2016-02-29 10:26 +0800
Last post2016-02-29 10:26 +0800
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python


Contents

  why not define a EVENT_ERROR in selectors module? gansteed <gansteed@gmail.com> - 2016-02-29 10:26 +0800

#103695 — why not define a EVENT_ERROR in selectors module?

Fromgansteed <gansteed@gmail.com>
Date2016-02-29 10:26 +0800
Subjectwhy not define a EVENT_ERROR in selectors module?
Message-ID<mailman.3.1456734761.20602.python-list@python.org>
as the title:

    I'm reading the source code of selectors, I got this:

# generic events, that must be mapped to implementation-specific ones
EVENT_READ = (1 << 0)
EVENT_WRITE = (1 << 1)

    maybe we can add definitions for EVENT_ERROR like this:

# Choose the best implementation, roughly:
#    epoll|kqueue|devpoll > poll > select.
# select() also can't accept a FD > FD_SETSIZE (usually around 1024)
if 'KqueueSelector' in globals():
    DefaultSelector = KqueueSelector
    EVENT_ERROR = EVENT_WRITE << 1
elif 'EpollSelector' in globals():
    ...
elif ...:
    ...

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web