From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Tue, 19 Aug 2025 11:27:36 +0000 (+0200) Subject: [3.14] gh-127859: Fixed documentation for call_later and call_at for early wakeup... X-Git-Tag: v3.14.0rc3~141 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3fa5a4beb4b5fa7ad7e55351b07a2e8f8f4263f5;p=thirdparty%2FPython%2Fcpython.git [3.14] gh-127859: Fixed documentation for call_later and call_at for early wakeup in asyncio (GH-137859) (#137908) Co-authored-by: Bar Harel --- diff --git a/Doc/library/asyncio-eventloop.rst b/Doc/library/asyncio-eventloop.rst index 9561c40776f0..0ccc7a2b4482 100644 --- a/Doc/library/asyncio-eventloop.rst +++ b/Doc/library/asyncio-eventloop.rst @@ -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.