|
FastLED 3.9.15
|
Promise-based fluent API for FastLED - standalone async primitives.
The fl::task::Promise<T> API provides fluent .then() semantics that are intuitive and chainable for async operations in FastLED. This is a lightweight, standalone implementation that doesn't depend on fl::future.
Definition in file promise.h.
#include "fl/stl/function.h"#include "fl/stl/string.h"#include "fl/stl/shared_ptr.h"#include "fl/stl/move.h"#include "fl/stl/atomic.h"#include "fl/stl/noexcept.h"
Include dependency graph for promise.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Classes | |
| class | fl::task::detail::PromiseImpl< T > |
| Implementation class for Promise - holds the actual state and logic. More... | |
| struct | fl::task::Error |
| Error type for promises. More... | |
| class | fl::task::Promise< T > |
| Promise class that provides fluent .then() and .catch_() semantics This is a lightweight wrapper around a shared PromiseImpl for easy copying/sharing. More... | |
Namespaces | |
| namespace | fl |
| Base definition for an LED controller. | |
| namespace | fl::task |
| namespace | fl::task::detail |
Enumerations | |
| enum class | fl::task::detail::PromiseState_t { fl::task::detail::PENDING , fl::task::detail::RESOLVED , fl::task::detail::REJECTED } |
| State enumeration for promises. More... | |
Functions | |
| template<typename T> | |
| Promise< T > | fl::task::make_rejected_promise (const char *error_message) FL_NOEXCEPT |
| Convenience function to create a rejected Promise (const char* overload) | |
| template<typename T> | |
| Promise< T > | fl::task::make_rejected_promise (const fl::string &error_message) FL_NOEXCEPT |
| Convenience function to create a rejected Promise. | |
| template<typename T> | |
| Promise< T > | fl::task::make_resolved_promise (T value) FL_NOEXCEPT |
| Convenience function to create a resolved Promise. | |