Skip to content

Commit 299f499

Browse files
committed
clarify docs for scheduler.run(blocking=False)
1 parent bb5c687 commit 299f499

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Diff for: Doc/library/sched.rst

+5-3
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)