Skip to content
This repository was archived by the owner on Sep 6, 2023. It is now read-only.

Commit 328c1e7

Browse files
author
Paul Sokolovsky
committed
docs/uselect: Document one-shot polling mode.
1 parent 9a7e346 commit 328c1e7

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

docs/library/uselect.rst

+8-2
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,18 @@ Methods
6666

6767
Tuples returned may contain more than 2 elements as described above.
6868

69-
.. method:: poll.ipoll([timeout])
69+
.. method:: poll.ipoll(timeout=-1, flags=0)
7070

7171
Like :meth:`poll.poll`, but instead returns an iterator which yields
72-
callee-owned tuples. This function provides efficient, allocation-free
72+
`callee-owned tuples`. This function provides efficient, allocation-free
7373
way to poll on streams.
7474

75+
If *flags* is 1, one-shot behavior for events is employed: streams for
76+
which events happened, event mask will be automatically reset (equivalent
77+
to ``poll.modify(obj, 0)``), so new events for such a stream won't be
78+
processed until new mask is set with `poll.modify()`. This behavior is
79+
useful for asynchronous I/O schedulers.
80+
7581
.. admonition:: Difference to CPython
7682
:class: attention
7783

0 commit comments

Comments
 (0)