Skip to content

Commit ca2fdca

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

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
@@ -119,9 +119,11 @@ Scheduler Objects
119119
function passed to the constructor) for the next event, then execute it and so
120120
on until there are no more scheduled events.
121121

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

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

0 commit comments

Comments
 (0)