aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorPaul Sokolovsky2017-10-26 00:28:45 +0300
committerPaul Sokolovsky2017-10-26 00:30:07 +0300
commit328c1e78be68a386fe6fb5940027aad887c823a4 (patch)
tree1d509d245909c37bae0e7fcc9fae8cc2aedb38f4 /docs
parent9a7e3469b28b02b05b85789acc6c0a78b9804659 (diff)
docs/uselect: Document one-shot polling mode.
Diffstat (limited to 'docs')
-rw-r--r--docs/library/uselect.rst10
1 files changed, 8 insertions, 2 deletions
diff --git a/docs/library/uselect.rst b/docs/library/uselect.rst
index e330207db..beffce69a 100644
--- a/docs/library/uselect.rst
+++ b/docs/library/uselect.rst
@@ -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