FastLED 3.10.6
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 }
fl::function< void(const T &)> mThenCallback
Definition promise.h:350
const T & value() const FL_NO_EXCEPT
Get value (only valid if resolved)
Definition promise.h:336
void process_callbacks() FL_NO_EXCEPT
Process pending callbacks.
Definition promise.h:366
PromiseState_t state() const FL_NO_EXCEPT
Read the state atomically.
Definition promise.h:356
void set_state(PromiseState_t s) FL_NO_EXCEPT
Write the state atomically.
Definition promise.h:361
Implementation class for Promise - holds the actual state and logic.
Definition promise.h:245
constexpr remove_reference< T >::type && move(T &&t) FL_NO_EXCEPT
Definition move.h:28

References fl::FL_NO_EXCEPT, mCallbacksProcessed, 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: