Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #103695
| From | gansteed <gansteed@gmail.com> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | why not define a EVENT_ERROR in selectors module? |
| Date | 2016-02-29 10:26 +0800 |
| Message-ID | <mailman.3.1456734761.20602.python-list@python.org> (permalink) |
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 comp.lang.python | Previous | Next | Find similar | Unroll thread
why not define a EVENT_ERROR in selectors module? gansteed <gansteed@gmail.com> - 2016-02-29 10:26 +0800
csiph-web