Skip to content

Commit b2adf55

Browse files
gh-126137: improve docs for loop.add_reader and loop.add_writer (#128666)
1 parent 1439b81 commit b2adf55

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Doc/library/asyncio-eventloop.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -970,6 +970,9 @@ Watching file descriptors
970970
invoke *callback* with the specified arguments once *fd* is available for
971971
reading.
972972

973+
Any preexisting callback registered for *fd* is cancelled and replaced by
974+
*callback*.
975+
973976
.. method:: loop.remove_reader(fd)
974977

975978
Stop monitoring the *fd* file descriptor for read availability. Returns
@@ -981,6 +984,9 @@ Watching file descriptors
981984
invoke *callback* with the specified arguments once *fd* is available for
982985
writing.
983986

987+
Any preexisting callback registered for *fd* is cancelled and replaced by
988+
*callback*.
989+
984990
Use :func:`functools.partial` :ref:`to pass keyword arguments
985991
<asyncio-pass-keywords>` to *callback*.
986992

0 commit comments

Comments
 (0)