Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #103695 > unrolled thread
| Started by | gansteed <gansteed@gmail.com> |
|---|---|
| First post | 2016-02-29 10:26 +0800 |
| Last post | 2016-02-29 10:26 +0800 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
why not define a EVENT_ERROR in selectors module? gansteed <gansteed@gmail.com> - 2016-02-29 10:26 +0800
| From | gansteed <gansteed@gmail.com> |
|---|---|
| Date | 2016-02-29 10:26 +0800 |
| Subject | why 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 ...:
...
Back to top | Article view | comp.lang.python
csiph-web