diff options
Diffstat (limited to 'docs/library/select.rst')
-rw-r--r-- | docs/library/select.rst | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/docs/library/select.rst b/docs/library/select.rst index 76202739c8..57adbb49af 100644 --- a/docs/library/select.rst +++ b/docs/library/select.rst @@ -1,7 +1,7 @@ -:mod:`uselect` -- wait for events on a set of streams -======================================================================== +:mod:`select` -- wait for events on a set of streams +==================================================== -.. module:: uselect +.. module:: select :synopsis: wait for events on a set of streams |see_cpython_module| :mod:`python:select`. @@ -35,15 +35,15 @@ Methods Register `stream` *obj* for polling. *eventmask* is logical OR of: - * ``uselect.POLLIN`` - data available for reading - * ``uselect.POLLOUT`` - more data can be written + * ``select.POLLIN`` - data available for reading + * ``select.POLLOUT`` - more data can be written - Note that flags like ``uselect.POLLHUP`` and ``uselect.POLLERR`` are + Note that flags like ``select.POLLHUP`` and ``select.POLLERR`` are *not* valid as input eventmask (these are unsolicited events which will be returned from `poll()` regardless of whether they are asked for). This semantics is per POSIX. - *eventmask* defaults to ``uselect.POLLIN | uselect.POLLOUT``. + *eventmask* defaults to ``select.POLLIN | select.POLLOUT``. It is OK to call this function multiple times for the same *obj*. Successive calls will update *obj*'s eventmask to the value of @@ -67,8 +67,8 @@ Methods Returns list of (``obj``, ``event``, ...) tuples. There may be other elements in tuple, depending on a platform and version, so don't assume that its size is 2. The ``event`` element specifies which events happened with a stream and - is a combination of ``uselect.POLL*`` constants described above. Note that - flags ``uselect.POLLHUP`` and ``uselect.POLLERR`` can be returned at any time + is a combination of ``select.POLL*`` constants described above. Note that + flags ``select.POLLHUP`` and ``select.POLLERR`` can be returned at any time (even if were not asked for), and must be acted on accordingly (the corresponding stream unregistered from poll and likely closed), because otherwise all further invocations of `poll()` may return immediately with |