mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
[Part of patch #909005] Set initial poll flags
This commit is contained in:
parent
68522b1895
commit
0ebbbe30f1
1 changed files with 2 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue