Skip to content

Commit 1d2d62c

Browse files
[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 b2adf55) Co-authored-by: Kumar Aditya <[email protected]>
1 parent 4f01a12 commit 1d2d62c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Doc/library/asyncio-eventloop.rst

+6
Original file line numberDiff line numberDiff line change
@@ -960,6 +960,9 @@ Watching file descriptors
960960
invoke *callback* with the specified arguments once *fd* is available for
961961
reading.
962962

963+
Any preexisting callback registered for *fd* is cancelled and replaced by
964+
*callback*.
965+
963966
.. method:: loop.remove_reader(fd)
964967

965968
Stop monitoring the *fd* file descriptor for read availability. Returns
@@ -971,6 +974,9 @@ Watching file descriptors
971974
invoke *callback* with the specified arguments once *fd* is available for
972975
writing.
973976

977+
Any preexisting callback registered for *fd* is cancelled and replaced by
978+
*callback*.
979+
974980
Use :func:`functools.partial` :ref:`to pass keyword arguments
975981
<asyncio-pass-keywords>` to *callback*.
976982

0 commit comments

Comments
 (0)