5#ifndef FLUTTER_IMPELLER_BASE_PROMISE_H_
6#define FLUTTER_IMPELLER_BASE_PROMISE_H_
14 std::promise<T> promise;
15 auto future = promise.get_future();
16 promise.set_value(std::move(t));
32 promise_.set_value({});
36 std::future<T>
get_future() {
return promise_.get_future(); }
39 promise_.set_value(
value);
44 std::promise<T> promise_;
45 bool value_set_ =
false;
std::future< T > get_future()
void set_value(const T &value)
NoExceptionPromise()=default
std::future< T > RealizedFuture(T t)