]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-127859: Fixed documentation for call_later and call_at for early wakeup in asyncio...
authorBar Harel <bzvi7919@gmail.com>
Mon, 18 Aug 2025 12:18:54 +0000 (13:18 +0100)
committerGitHub <noreply@github.com>
Mon, 18 Aug 2025 12:18:54 +0000 (17:48 +0530)
Doc/library/asyncio-eventloop.rst

index 9561c40776f01c77c541468fe11c0911b3a36818..0ccc7a2b4482ec7155fcdea384aad7f93d8b90d2 100644 (file)
@@ -304,6 +304,12 @@ clocks to track time.
    custom :class:`contextvars.Context` for the *callback* to run in.
    The current context is used when no *context* is provided.
 
+   .. note::
+
+      For performance, callbacks scheduled with :meth:`loop.call_later`
+      may run up to one clock-resolution early (see
+      ``time.get_clock_info('monotonic').resolution``).
+
    .. versionchanged:: 3.7
       The *context* keyword-only parameter was added. See :pep:`567`
       for more details.
@@ -324,6 +330,12 @@ clocks to track time.
    An instance of :class:`asyncio.TimerHandle` is returned which can
    be used to cancel the callback.
 
+   .. note::
+
+      For performance, callbacks scheduled with :meth:`loop.call_at`
+      may run up to one clock-resolution early (see
+      ``time.get_clock_info('monotonic').resolution``).
+
    .. versionchanged:: 3.7
       The *context* keyword-only parameter was added. See :pep:`567`
       for more details.