Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e79f355

Browse files
committed
Merge 3.4 (issue #24509)
2 parents f76628f + 1096f76 commit e79f355

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

Doc/library/asyncio-eventloop.rst

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,8 @@ keywords to your callback, use :func:`functools.partial`. For example,
9797
Any positional arguments after the callback will be passed to the
9898
callback when it is called.
9999

100-
An instance of :class:`asyncio.Handle` is returned.
100+
An instance of :class:`asyncio.Handle` is returned, which can be
101+
used to cancel the callback.
101102

102103
:ref:`Use functools.partial to pass keywords to the callback
103104
<asyncio-pass-keywords>`.
@@ -130,7 +131,8 @@ a different clock than :func:`time.time`.
130131
Arrange for the *callback* to be called after the given *delay*
131132
seconds (either an int or float).
132133

133-
An instance of :class:`asyncio.Handle` is returned.
134+
An instance of :class:`asyncio.Handle` is returned, which can be
135+
used to cancel the callback.
134136

135137
*callback* will be called exactly once per call to :meth:`call_later`.
136138
If two callbacks are scheduled for exactly the same time, it is
@@ -151,6 +153,9 @@ a different clock than :func:`time.time`.
151153

152154
This method's behavior is the same as :meth:`call_later`.
153155

156+
An instance of :class:`asyncio.Handle` is returned, which can be
157+
used to cancel the callback.
158+
154159
:ref:`Use functools.partial to pass keywords to the callback
155160
<asyncio-pass-keywords>`.
156161

@@ -704,7 +709,8 @@ Handle
704709

705710
.. method:: cancel()
706711

707-
Cancel the call.
712+
Cancel the call. If the callback is already canceled or executed,
713+
this method has no effect.
708714

709715

710716
Event loop examples

0 commit comments

Comments
 (0)