| 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 #pragma once
6
7 #include <future>
8
9 namespace impeller {
10
11 template <class T>
12 std::future<T> RealizedFuture(T t) {
13 std::promise<T> promise;
14 auto future = promise.get_future();
15 promise.set_value(std::move(t));
16 return future;
17 }
18
19 } // namespace impeller
impeller::RealizedFuture
std::future< T > RealizedFuture(T t)
Definition: promise.h:12
impeller
Definition: aiks_context.cc:10