Skip to content

Commit ea58c35

Browse files
[3.15] Clarify docs for scheduler.run(blocking=False) (GH-129575) (GH-150668)
(cherry picked from commit 2f8f569) Co-authored-by: M. Greyson Christoforo <grey@christoforo.net>
1 parent 2fb2a23 commit ea58c35

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

Doc/library/sched.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,11 @@ Scheduler Objects
117117
function passed to the constructor) for the next event, then execute it and so
118118
on until there are no more scheduled events.
119119

120-
If *blocking* is false executes the scheduled events due to expire soonest
121-
(if any) and then return the deadline of the next scheduled call in the
122-
scheduler (if any).
120+
If *blocking* is false, immediately executes all events in the queue which have
121+
a time value less than or equal to the current *timefunc* value (if any) and
122+
returns the difference between the current *timefunc* value and the time value
123+
of the next scheduled event in the scheduler's event queue. If the queue is
124+
empty, returns ``None``.
123125

124126
Either *action* or *delayfunc* can raise an exception. In either case, the
125127
scheduler will maintain a consistent state and propagate the exception. If an

0 commit comments

Comments
 (0)