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