Skip to content

Commit

Permalink
pythongh-126137: improve docs for loop.add_reader and `loop.add_wri…
Browse files Browse the repository at this point in the history
…ter` (python#128666)
  • Loading branch information
kumaraditya303 authored Jan 9, 2025
1 parent 1439b81 commit b2adf55
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Doc/library/asyncio-eventloop.rst
Original file line number Diff line number Diff line change
Expand Up @@ -970,6 +970,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
Expand All @@ -981,6 +984,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*.

Expand Down

0 comments on commit b2adf55

Please sign in to comment.