File tree Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -176,8 +176,6 @@ void run_scheduled_recurrent_functions()
176
176
done = current == stop;
177
177
const bool wakeupToken = current->wakeupToken && current->wakeupToken ->load ();
178
178
const bool wakeup = current->wakeupTokenCmp != wakeupToken;
179
- if (wakeup)
180
- current->wakeupTokenCmp = wakeupToken;
181
179
bool callNow = current->callNow ;
182
180
183
181
if ((wakeup || callNow) && !current->mFunc ())
Original file line number Diff line number Diff line change @@ -59,8 +59,8 @@ void run_scheduled_functions();
59
59
// functions. However a user function returning false will cancel itself.
60
60
// * Long running operations or yield() or delay() are not allowed in the
61
61
// recurrent function.
62
- // * If a wakeupToken is used, if its value toggles, any remaining
63
- // delay is disregarded, and the lambda runs on the next scheduler iteration .
62
+ // * If a wakeupToken is used, anytime during scheduling when its value differs from that
63
+ // during this call, any remaining delay from repeat_us is disregarded, and fn is executed .
64
64
bool schedule_recurrent_function_us (const std::function<bool (void )>& fn, uint32_t repeat_us,
65
65
const std::atomic<bool>* wakeupToken = nullptr);
66
66
You can’t perform that action at this time.
0 commit comments