Crate batch_aint_one

source ·
Expand description

Batch up multiple items for processing as a single unit.

I got 99 problems, but a batch ain’t one…

Sometimes it is more efficient to process many items at once rather than one at a time. Especially when the processing step has overheads which can be shared between many items.

A worker task is run in the background and items are submitted to it for batching. Batches are processed in their own tasks, concurrently.

See the README for an example.

Structs§

  • Groups items to be processed in batches.
  • A policy controlling limits on batch sizes and concurrency.

Enums§

  • An error that occurred while trying to batch.
  • A policy controlling when batches get processed.
  • What to do when a batch becomes full.

Traits§

  • Process a batch of inputs for a given key.