mirror of
https://github.com/python/cpython.git
synced 2024-11-29 21:05:33 +08:00
[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()
|
||||
if map:
|
||||
for fd, obj in map.items():
|
||||
flags = 0
|
||||
flags = select.POLLERR | select.POLLHUP | select.POLLNVAL
|
||||
if obj.readable():
|
||||
flags = select.POLLIN
|
||||
flags = select.POLLIN | select.POLLPRI
|
||||
if obj.writable():
|
||||
flags = flags | select.POLLOUT
|
||||
if flags:
|
||||
|
Loading…
Reference in New Issue
Block a user