From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Sun, 31 May 2026 12:19:43 +0000 (+0200) Subject: [3.15] Clarify docs for scheduler.run(blocking=False) (GH-129575) (GH-150668) X-Git-Tag: v3.15.0b2~30 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=ea58c352b717c8ea06a43c76bf99985bd42c288b;p=thirdparty%2FPython%2Fcpython.git [3.15] Clarify docs for scheduler.run(blocking=False) (GH-129575) (GH-150668) (cherry picked from commit 2f8f569ba911ab3cff1356a15a3e688adc4ae917) Co-authored-by: M. Greyson Christoforo --- diff --git a/Doc/library/sched.rst b/Doc/library/sched.rst index 70541c5f3cb3..037e27f031d0 100644 --- a/Doc/library/sched.rst +++ b/Doc/library/sched.rst @@ -117,9 +117,11 @@ Scheduler Objects function passed to the constructor) for the next event, then execute it and so on until there are no more scheduled events. - If *blocking* is false executes the scheduled events due to expire soonest - (if any) and then return the deadline of the next scheduled call in the - scheduler (if any). + If *blocking* is false, immediately executes all events in the queue which have + a time value less than or equal to the current *timefunc* value (if any) and + returns the difference between the current *timefunc* value and the time value + of the next scheduled event in the scheduler's event queue. If the queue is + empty, returns ``None``. Either *action* or *delayfunc* can raise an exception. In either case, the scheduler will maintain a consistent state and propagate the exception. If an