job scheduler works with run once and run periodic schedules. Stop logic is not fully thought through.
Dependents: JobSchedulerDemo Borsch
Diff: scheduler.h
- Revision:
- 7:98c8b2eabea3
- Parent:
- 5:d8f69ac330f2
- Child:
- 13:6be67ee77861
--- a/scheduler.h Tue Jul 11 22:42:08 2017 +0000 +++ b/scheduler.h Tue Jul 11 23:03:23 2017 +0000 @@ -153,14 +153,17 @@ void onWakeOnce(); private: Thread _updater; + bool _quitUpdater; + /** _updates contains incoming actions for _updater */ + Queue<Action, 5> _updates; + Thread _runner; - bool _quit; + bool _quitRunner; + /** _runs contains Appointments for _runner to execute. */ + Queue<Appointment, 5> _runs; + JobService *_jobService; JobID _nextJobID; - /** _updates contains incoming actions for _updater */ - Queue<Action, 5> _updates; - /** _runs contains Appointments for _runner to execute. */ - Queue<Appointment, 5> _runs; LinkedList<Appointment> _timeline; }; } \ No newline at end of file