|
FastLED 3.10.8
|
Task executor — runs registered task runners and manages the run loop.
This module provides a unified system for managing background operations across FastLED, including HTTP requests, timers, and other background tasks.
The executor is pumped by fl::task::run(). Platform code may also call run() while yielding, but FastLED.show() does not update registered runners.
Definition in file executor.h.
#include "fl/task/promise.h"#include "fl/task/promise_result.h"#include "fl/task/scheduler.h"#include "fl/stl/singleton.h"#include "fl/task/task.h"#include "platforms/await.h"#include "fl/stl/cstddef.h"#include "fl/stl/stdint.h"#include "fl/stl/vector.h"#include "fl/stl/noexcept.h"
Include dependency graph for executor.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Classes | |
| class | fl::task::Executor |
| Task executor (singleton) — manages registered runners. More... | |
| class | fl::task::Runner |
| Generic task runner interface. More... | |
Namespaces | |
| namespace | fl |
| Base definition for an LED controller. | |
| namespace | fl::task |
| namespace | fl::task::detail |
Enumerations | |
| enum class | fl::task::ExecFlags : u8 { fl::task::TASKS = 1 << 0 , fl::task::COROUTINES = 1 << 1 , fl::task::SYSTEM = 1 << 2 , fl::task::ALL = (1 << 0) | (1 << 1) | (1 << 2) } |
| Flags controlling which subsystems run() pumps. More... | |
Functions | |
| size_t | fl::task::active_tasks () FL_NO_EXCEPT |
| Get the number of active tasks across all systems. | |
| template<typename T> | |
| PromiseResult< T > | fl::task::await (Promise< T > p, fl::u32 timeout_ms=fl::platforms::kAwaitDefaultTimeoutMs) FL_NO_EXCEPT |
| Await promise completion in a coroutine (Trampoline to platform implementation) | |
| int & | fl::task::detail::await_depth_tls () FL_NO_EXCEPT |
| Get reference to thread-local await recursion depth. | |
| template<typename T> | |
| PromiseResult< T > | fl::task::await_top_level (Promise< T > p) FL_NO_EXCEPT |
| Synchronously wait for a promise to complete (ONLY safe in top-level contexts) | |
| bool | fl::task::has_tasks () FL_NO_EXCEPT |
| Check if any systems have active tasks. | |
| bool | fl::task::operator& (ExecFlags a, ExecFlags b) FL_NO_EXCEPT |
| ExecFlags | fl::task::operator| (ExecFlags a, ExecFlags b) FL_NO_EXCEPT |
| void | fl::task::run (fl::u32 microseconds=1000, ExecFlags flags=ExecFlags::ALL) FL_NO_EXCEPT |
| Run selected task subsystems. | |
| void | fl::task::yield_system (fl::u32 microseconds) FL_NO_EXCEPT |
OS-level yield only: same behavior as run(us, ExecFlags::SYSTEM). | |