Applying functions: f_apply

more_executors.f_apply(future_fn, *future_args, **future_kwargs)

Call a function, where the function, its arguments and return value are all provided by futures.

Signature: Future<fn<A[,B[,...]]⟶R>>, Future<A>[, Future<B>[, ...]] Future<R>

Parameters
  • future_fn (Future of callable) – A future returning a function to be applied.

  • future_args (Future) – Futures holding positional arguments for the function.

  • future_kwargs (Future) – Futures holding keyword arguments for the function.

Returns

A future holding the returned value of the applied function.

Return type

Future

New in version 1.19.0.