summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorAndrew Svetlov <andrew.svetlov@gmail.com>2018-02-01 17:59:32 (GMT)
committerGitHub <noreply@github.com>2018-02-01 17:59:32 (GMT)
commit3d4dbd8f019c0bbac99fc9248077044ff1039ca3 (patch)
tree4a01df373f516fc9b92afeb80f8531d0fcdef647 /Doc
parent83ab995871ffd504ac229bdbf5b9e9ffc1032815 (diff)
downloadcpython-3d4dbd8f019c0bbac99fc9248077044ff1039ca3.zip
cpython-3d4dbd8f019c0bbac99fc9248077044ff1039ca3.tar.gz
cpython-3d4dbd8f019c0bbac99fc9248077044ff1039ca3.tar.bz2
Implement TimerHandle.when() (#5473)
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/asyncio-eventloop.rst23
1 files changed, 19 insertions, 4 deletions
diff --git a/Doc/library/asyncio-eventloop.rst b/Doc/library/asyncio-eventloop.rst
index 5f915c5..a19c670 100644
--- a/Doc/library/asyncio-eventloop.rst
+++ b/Doc/library/asyncio-eventloop.rst
@@ -171,7 +171,7 @@ a different clock than :func:`time.time`.
Arrange for the *callback* to be called after the given *delay*
seconds (either an int or float).
- An instance of :class:`asyncio.Handle` is returned, which can be
+ An instance of :class:`asyncio.TimerHandle` is returned, which can be
used to cancel the callback.
*callback* will be called exactly once per call to :meth:`call_later`.
@@ -193,7 +193,7 @@ a different clock than :func:`time.time`.
This method's behavior is the same as :meth:`call_later`.
- An instance of :class:`asyncio.Handle` is returned, which can be
+ An instance of :class:`asyncio.TimerHandle` is returned, which can be
used to cancel the callback.
:ref:`Use functools.partial to pass keywords to the callback
@@ -1076,8 +1076,7 @@ Handle
.. class:: Handle
A callback wrapper object returned by :func:`AbstractEventLoop.call_soon`,
- :func:`AbstractEventLoop.call_soon_threadsafe`, :func:`AbstractEventLoop.call_later`,
- and :func:`AbstractEventLoop.call_at`.
+ :func:`AbstractEventLoop.call_soon_threadsafe`.
.. method:: cancel()
@@ -1090,6 +1089,22 @@ Handle
.. versionadded:: 3.7
+.. class:: TimerHandle
+
+ A callback wrapper object returned by :func:`AbstractEventLoop.call_later`,
+ and :func:`AbstractEventLoop.call_at`.
+
+ The class is inherited from :class:`Handle`.
+
+ .. method:: when()
+
+ Return a scheduled callback time as :class:`float` seconds.
+
+ The time is an absolute timestamp, using the same time
+ reference as :meth:`AbstractEventLoop.time`.
+
+ .. versionadded:: 3.7
+
SendfileNotAvailableError
-------------------------