-
#include "tensorstore/util/future.h"
-
template <typename Callback,
typename PromiseValue,
typename... Futures>
FutureCallbackRegistration
tensorstore::LinkValue(Callback&& callback,
Promise<PromiseValue> promise,
Futures&&... future); Creates a “link”, which ties a
promise
to one or morefuture
objects and acallback
.Same as
Link
, except that thecallback
is called only if thefuture
objects become ready with a non-error result. The first error result encountered among thefuture
objects will be automatically propagated to thepromise
.