-
#include "tensorstore/util/future.h"
-
template <typename Executor,
typename Callback,
typename... FutureValue>
auto tensorstore::MapFuture(Executor&& executor,
Callback&& callback,
Future<FutureValue>... future); Returns a
Future
that resolves to the result of callingcallback(future.result()...)
when all of the specifiedfuture
objects become ready. Thecallback
is invoked using the specifiedexecutor
.- Parameters:¶
- Executor &&executor¶
Executor with which to invoke the
callback
callback.- Callback &&callback¶
Callback function to be invoked as
callback(future.result()...)
when all of thefuture
objects become ready. The callback is invoked immediately if all of thefuture
objects are already ready.- Future<FutureValue>... future¶
The
Future
objects to link.
- Dchecks:¶
(!future.null() && ...)
- Returns:¶
A
Future<UnwrapFutureType<std::remove_cvref_t<U>>>
, whereU
is the return type of the specifiedcallback
function.