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

◆ resolve() [1/2]

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

Resolve promise with value.

Definition at line 290 of file promise.h.

290 {
291 if (mState != PromiseState_t::PENDING) return false;
292
293 mValue = value;
295
296 // Process callback immediately if we have one
299 }
300
301 return true;
302 }
void process_callbacks()
Process pending callbacks.
Definition promise.h:369
PromiseState_t mState
Definition promise.h:359
const T & value() const
Get value (only valid if resolved)
Definition promise.h:349
fl::function< void(const T &)> mThenCallback
Definition promise.h:363
Implementation class for promise - holds the actual state and logic.
Definition promise.h:259

References mCallbacksProcessed, mState, mThenCallback, mValue, fl::detail::PENDING, process_callbacks(), fl::detail::RESOLVED, and value().

+ Here is the call graph for this function: