docs/uselect: Document one-shot polling mode.

pull/1/head
Paul Sokolovsky 2017-10-26 00:28:45 +03:00
parent 9a7e3469b2
commit 328c1e78be
1 changed files with 8 additions and 2 deletions

View File

@ -66,12 +66,18 @@ Methods
Tuples returned may contain more than 2 elements as described above.
.. method:: poll.ipoll([timeout])
.. method:: poll.ipoll(timeout=-1, flags=0)
Like :meth:`poll.poll`, but instead returns an iterator which yields
callee-owned tuples. This function provides efficient, allocation-free
`callee-owned tuples`. This function provides efficient, allocation-free
way to poll on streams.
If *flags* is 1, one-shot behavior for events is employed: streams for
which events happened, event mask will be automatically reset (equivalent
to ``poll.modify(obj, 0)``), so new events for such a stream won't be
processed until new mask is set with `poll.modify()`. This behavior is
useful for asynchronous I/O schedulers.
.. admonition:: Difference to CPython
:class: attention