-
#include "tensorstore/util/future.h"
-
template <typename T>
class [[nodiscard]] tensorstore::PromiseFuturePair; Pairs a Promise with a Future.
This is the primary interface intended to be used by producers.
- Template Parameters:¶
Types¶
- using PromiseType = Promise<T>;
Promise type.
- using FutureType = Future<T>;
Future type.
Data members¶
- PromiseType promise;
Promise object.
- FutureType future;
Future object.
Methods¶
- static PromiseFuturePair Make(ResultInit&&... result_init);
Makes a new Promise/Future pair.
-
static PromiseFuturePair
Link(Callback&& callback, Futures&&... future); -
static PromiseFuturePair 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
.
-
static PromiseFuturePair
LinkValue(Callback&& callback, Futures&&... future); -
static PromiseFuturePair LinkValue(ResultInit&& result_init,
Callback&& callback,
Futures&&... future); Same as
Link
, except that the behavior matchestensorstore::LinkValue
instead oftensorstore::Link
.
-
static PromiseFuturePair
LinkError(ResultInit&& result_init, Futures&&... future); Creates a new PromiseFuturePair with the Future result initialized using
result_init
. Links the specifiedfuture
objects to the newly created promise as if by callingtensorstore::LinkError
.