Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
549c79d1
Commit
549c79d1
authored
Nov 09, 2015
by
Paul Sokolovsky
Browse files
docs/select: Document POLLIN/OUT/ERR/HUP.
parent
746b752b
Changes
1
Hide whitespace changes
Inline
Side-by-side
docs/library/select.rst
View file @
549c79d1
...
...
@@ -38,8 +38,14 @@ Methods
.. method:: poll.register(obj[, eventmask])
Register ``obj`` for polling. ``eventmask`` is 1 for read, 2 for
write, 3 for read-write.
Register ``obj`` for polling. ``eventmask`` is logical OR of:
* ``select.POLLIN`` - data available for reading
* ``select.POLLOUT`` - more data can be written
* ``select.POLLERR`` - error occurred
* ``select.POLLHUP`` - end of stream/connection termination detected
``eventmask`` defaults to ``select.POLLIN | select.POLLOUT``.
.. method:: poll.unregister(obj)
...
...
@@ -52,10 +58,10 @@ Methods
.. method:: poll.poll([timeout])
Wait for at least one of the registered objects to become ready. Returns
list of (``obj``, ``event``, ...) tuples, ``event`` element specif
ying
wh
ether ``obj`` is ready for reading, writing, or both (see ``register`
`
metho
d above
)
. There may be other elements in tuple, depending
on platform
and version, so don't assume that its size is 2. In case of
timeout, an
empty list is returned.
list of (``obj``, ``event``, ...) tuples, ``event`` element specif
ies
wh
ich events happened with a stream and is a combination of `select.POLL*
`
constants describe
d above. There may be other elements in tuple, depending
on platform
and version, so don't assume that its size is 2. In case of
timeout, an
empty list is returned.
Timeout is in milliseconds.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment