Skip to content

Commit 328c1e7

Browse files
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

Lines changed: 8 additions & 2 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy