Flutter Impeller
promise.h
Go to the documentation of this file.
1
// Copyright 2013 The Flutter Authors. All rights reserved.
2
// Use of this source code is governed by a BSD-style license that can be
3
// found in the LICENSE file.
4
5
#ifndef FLUTTER_IMPELLER_BASE_PROMISE_H_
6
#define FLUTTER_IMPELLER_BASE_PROMISE_H_
7
8
#include <future>
9
10
namespace
impeller
{
11
12
template
<
class
T>
13
std::future<T>
RealizedFuture
(T t) {
14
std::promise<T> promise;
15
auto
future = promise.get_future();
16
promise.set_value(std::move(t));
17
return
future;
18
}
19
20
}
// namespace impeller
21
22
#endif // FLUTTER_IMPELLER_BASE_PROMISE_H_
impeller::RealizedFuture
std::future< T > RealizedFuture(T t)
Definition:
promise.h:13
impeller
Definition:
aiks_context.cc:10
impeller
base
promise.h
Generated by
1.8.17