MCPcopy Create free account
hub / github.com/FastLED/FastLED / set_then_callback

Method set_then_callback

src/fl/task/promise.h:250–256  ·  view source on GitHub ↗

Set success callback

Source from the content-addressed store, hash-verified

248
249 /// Set success callback
250 void set_then_callback(fl::function<void(const T&)> callback) FL_NOEXCEPT {
251 mThenCallback = fl::move(callback);
252 // If already resolved, process callback immediately
253 if (state() == PromiseState_t::RESOLVED && !mCallbacksProcessed) {
254 process_callbacks();
255 }
256 }
257
258 /// Set error callback
259 void set_catch_callback(fl::function<void(const Error&)> callback) FL_NOEXCEPT {

Callers 1

PromiseClass · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected