batch method
Batches the invocation of the Runnable on the given inputs
.
If the underlying provider supports batching, this method will try to batch the calls to the provider. Otherwise, it will just call invoke on each input concurrently.
You can configure the concurrency limit by setting the concurrencyLimit
field in the options
parameter.
inputs
- the inputs to invoke the Runnable on concurrently.options
- the options to use when invoking the Runnable. It can be:null
: the default options are used.- List with 1 element: the same options are used for all inputs.
- List with the same length as the inputs: each input gets its own options.
Implementation
@override
Future<List<RunOutput>> batch(
List<RunInput> inputs, {
List<RunnableOptions>? options,
}) async {
return retryClient(
options: retryOptions,
fn: () => runnable.batch(
inputs,
options: options,
),
);
}