-
#include "tensorstore/util/future.h"
-
template <typename Callback, typename... Futures>
static PromiseFuturePair
tensorstore::PromiseFuturePair<T>::Link(Callback&& callback,
Futures&&... future); -
template <typename ResultInit, typename Callback, typename... Futures>
requires std::is_constructible_v<Result<T>, ResultInit>
static PromiseFuturePair
tensorstore::PromiseFuturePair<T>::Link(ResultInit&& result_init,
Callback&& callback,
Futures&&... future); Creates a new PromiseFuturePair and links the newly created promise with the specified future objects as if by calling
tensorstore::Link
.Equivalent to:
auto pair = PromiseFuturePair<T>::Make(); tensorstore::Link(callback, pair.promise, future...); return pair;
except that only a single allocation is used for both the promise/future pair and the link.