mirror of
https://github.com/python/cpython.git
synced 2026-01-06 07:22:09 +00:00
gh-126137: improve docs for loop.add_reader and loop.add_writer (#128666)
This commit is contained in:
parent
1439b81928
commit
b2adf55674
1 changed files with 6 additions and 0 deletions
|
|
@ -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
|
||||
|
|
@ -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*.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue