FastLED 3.9.15
Loading...
Searching...
No Matches

◆ add_task()

int fl::task::Scheduler::add_task ( Handle t)

Definition at line 14 of file scheduler.cpp.hpp.

14 {
15 if (t.is_valid()) {
16 int task_id = mNextTaskId.fetch_add(1);
17 t._set_id(task_id);
18 mTasks.push_back(fl::move(t));
19 return task_id;
20 }
21 return 0; // Invalid task
22}
fl::vector< Handle > mTasks
Definition scheduler.h:39
fl::atomic< int > mNextTaskId
Definition scheduler.h:40
constexpr remove_reference< T >::type && move(T &&t) FL_NOEXCEPT
Definition s16x16x4.h:28

References mNextTaskId, fl::fl::move(), mTasks, and fl::t.

Referenced by fl::detail::AsyncLoggerServiceTask::AsyncLoggerServiceTask(), and fl::task::Handle::then().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: