mirror of
https://github.com/python/cpython.git
synced 2026-01-06 07:22:09 +00:00
[3.13] gh-126137: improve docs for loop.add_reader and loop.add_writer (GH-128666) (#128667)
gh-126137: improve docs for `loop.add_reader` and `loop.add_writer` (GH-128666)
(cherry picked from commit b2adf55674)
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
This commit is contained in:
parent
4f01a120f7
commit
1d2d62c15e
1 changed files with 6 additions and 0 deletions
|
|
@ -960,6 +960,9 @@ Watching file descriptors
|
|||
invoke *callback* with the specified arguments once *fd* is available for
|
||||
reading.
|
||||
|
||||
Any preexisting callback registered for *fd* is cancelled and replaced by
|
||||
*callback*.
|
||||
|
||||
.. method:: loop.remove_reader(fd)
|
||||
|
||||
Stop monitoring the *fd* file descriptor for read availability. Returns
|
||||
|
|
@ -971,6 +974,9 @@ Watching file descriptors
|
|||
invoke *callback* with the specified arguments once *fd* is available for
|
||||
writing.
|
||||
|
||||
Any preexisting callback registered for *fd* is cancelled and replaced by
|
||||
*callback*.
|
||||
|
||||
Use :func:`functools.partial` :ref:`to pass keyword arguments
|
||||
<asyncio-pass-keywords>` to *callback*.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue