mirror of
https://github.com/esp8266/Arduino.git
synced 2025-08-23 03:54:33 +03:00
* Fix for scheduling recurrent functions while inside scheduled function * Check that fn are valid. Invoking invalid functions throws otherwise. * Added wakeup token to scheduler. Toggling the token value breaks a scheduled function out from a delayed execution and makes it run on the next scheduler iteration. * Timer reset reliability fix. * Shrink interrupts-locked regions. Add check for periodic yield to scheduled functions run-loop. * Ordered, more predictable, scheduling. Before, it had different ordering compared to FastScheduler as well as sequential calls from loop(). * Optional, for the paranoid: revert changes to (non-recurrent) schedule_function() / run_scheduled_functions(). * Comment * Adapt one-line ifs to general style in same source file. * Fix wakeupToken handling - don't respond to toggle, but to different value vs. that at registering function with scheduler. * Reword comment. * Putting aside std::atomic concerns, use a callback for scheduler alarming. In the future, async future's .then() might take advantage of this direction. * Drop atomic include, align function type syntax. * Reduce flash use. * Prefer const ref over call by value plus std::move().