#include "tensorstore/util/executor.h"
template <typename Executor, typename Function>
  
requires (
      
!std::is_same_v<std::remove_cvref_t<Executor>, InlineExecutor>)
ExecutorBoundFunction<std::remove_cvref_t<Executor>,
                     
 std::remove_cvref_t<Function>>
tensorstore::WithExecutor(Executor&executorFunction&function);
template <typename Executor, typename Function>
  
requires std::is_same_v<std::remove_cvref_t<Executor>,
                         
 InlineExecutor>
Function&&
tensorstore::WithExecutor(Executor&executorFunction&function);

Returns an instance of ExecutorBoundFunction that invokes the given function function in the specified executor.

Any arguments are forwarded.