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

◆ resolve() [2/2]

template<typename T>
bool fl::task::detail::PromiseImpl< T >::resolve ( T && value)
inline

Definition at line 293 of file promise.h.

293 {
294 if (state() != PromiseState_t::PENDING) return false;
295
298
301 }
302
303 return true;
304 }
const T & value() const FL_NOEXCEPT
Get value (only valid if resolved)
Definition promise.h:336
void process_callbacks() FL_NOEXCEPT
Process pending callbacks.
Definition promise.h:366
void set_state(PromiseState_t s) FL_NOEXCEPT
Write the state atomically.
Definition promise.h:361
fl::function< void(const T &)> mThenCallback
Definition promise.h:350
PromiseState_t state() const FL_NOEXCEPT
Read the state atomically.
Definition promise.h:356
Implementation class for Promise - holds the actual state and logic.
Definition promise.h:245
constexpr remove_reference< T >::type && move(T &&t) FL_NOEXCEPT
Definition s16x16x4.h:28

References FL_NOEXCEPT, mCallbacksProcessed, fl::fl::move(), mThenCallback, mValue, fl::task::detail::PENDING, process_callbacks(), fl::task::detail::RESOLVED, set_state(), state(), and value().

+ Here is the call graph for this function: