mirror of https://github.com/python/cpython
[Part of patch #909005] Set initial poll flags
This commit is contained in:
parent
68522b1895
commit
0ebbbe30f1
|
@ -136,9 +136,9 @@ def poll2(timeout=0.0, map=None):
|
||||||
pollster = select.poll()
|
pollster = select.poll()
|
||||||
if map:
|
if map:
|
||||||
for fd, obj in map.items():
|
for fd, obj in map.items():
|
||||||
flags = 0
|
flags = select.POLLERR | select.POLLHUP | select.POLLNVAL
|
||||||
if obj.readable():
|
if obj.readable():
|
||||||
flags = select.POLLIN
|
flags = select.POLLIN | select.POLLPRI
|
||||||
if obj.writable():
|
if obj.writable():
|
||||||
flags = flags | select.POLLOUT
|
flags = flags | select.POLLOUT
|
||||||
if flags:
|
if flags:
|
||||||
|
|
Loading…
Reference in New Issue