]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Clarify docs for scheduler.run(blocking=False) (GH-129575)
authorM. Greyson Christoforo <grey@christoforo.net>
Sun, 31 May 2026 12:11:17 +0000 (13:11 +0100)
committerGitHub <noreply@github.com>
Sun, 31 May 2026 12:11:17 +0000 (12:11 +0000)
Doc/library/sched.rst

index 70541c5f3cb3676fffb55e1b8e271bac4234f77a..037e27f031d0c826491600192589e3133c2d9b6f 100644 (file)
@@ -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