#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 calling callback(future.result()...) when all of the specified future objects become ready. The callback is invoked using the specified executor.

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 the future objects become ready. The callback is invoked immediately if all of the future objects are already ready.

Future<FutureValue>... future

The Future objects to link.

Dchecks:

(!future.null() && ...)

Returns:

A Future<UnwrapFutureType<std::remove_cvref_t<U>>>, where U is the return type of the specified callback function.