FastLED 3.10.8
Loading...
Searching...
No Matches
scheduler.h
Go to the documentation of this file.
1#pragma once
2
5
6#include "fl/task/task.h"
8#include "fl/stl/singleton.h"
9#include "fl/stl/atomic.h"
10#include "fl/stl/vector.h"
11#include "fl/stl/noexcept.h"
12
13namespace fl {
14namespace task {
15
17public:
19
21 void update() FL_NO_EXCEPT;
22
23 // Dispatch the callbacks registered for one frame phase.
26
27 // For testing: clear all tasks
29
30private:
31 friend class fl::Singleton<Scheduler>;
33 ~Scheduler() FL_NO_EXCEPT override;
34
35 void onBeginFrame() FL_NO_EXCEPT override;
36 void onEndFrame() FL_NO_EXCEPT override;
37
38 void warn_no_then(int task_id, const fl::string& trace_label) FL_NO_EXCEPT;
39 void warn_no_catch(int task_id, const fl::string& trace_label, const Error& error) FL_NO_EXCEPT;
40
41 // Helper method for running specific task types
45
54};
55
56} // namespace task
57} // namespace fl
Task Handle with fluent API (was class fl::task, renamed to avoid namespace collision)
Definition task.h:156
void clear_all_tasks() FL_NO_EXCEPT
fl::vector< Handle > mTasks
Definition scheduler.h:46
fl::atomic< int > mNextTaskId
Definition scheduler.h:49
void warn_no_then(int task_id, const fl::string &trace_label) FL_NO_EXCEPT
bool mUpdatingAfterFrameTasks
Definition scheduler.h:52
bool mFrameListenerRegistered
Definition scheduler.h:53
static Scheduler & instance() FL_NO_EXCEPT
void warn_no_catch(int task_id, const fl::string &trace_label, const Error &error) FL_NO_EXCEPT
fl::vector< Handle > mAfterFrameSnapshot
Definition scheduler.h:48
bool mUpdatingBeforeFrameTasks
Definition scheduler.h:51
int add_task(Handle t) FL_NO_EXCEPT
void update_after_frame_tasks() FL_NO_EXCEPT
void onEndFrame() FL_NO_EXCEPT override
void remove_inactive_tasks() FL_NO_EXCEPT
void update_frame_listener_registration() FL_NO_EXCEPT
void update() FL_NO_EXCEPT
fl::vector< Handle > mBeforeFrameSnapshot
Definition scheduler.h:47
void update_before_frame_tasks() FL_NO_EXCEPT
Scheduler() FL_NO_EXCEPT
void onBeginFrame() FL_NO_EXCEPT override
void update_tasks_of_type(TaskType task_type) FL_NO_EXCEPT
TaskType
Identifies how a scheduled task is triggered.
Definition task.h:117
u8 u8 fract8 blur_amount FL_NO_EXCEPT
Definition blur.h:186
AtomicFake< T > atomic
Definition atomic.h:26
Base definition for an LED controller.
Error type for promises.
Definition promise.h:39