Skip to content

v0.1.20

Latest

Choose a tag to compare

@github-actions github-actions released this 26 Sep 12:06
· 22 commits to main since this release
4fdd7b3

Added

  • Batch resource (#9): new Batch<T>(sim, batchSize, { maxWait?, unbounded?, name? }) accumulates items and releases them as full batches, or partial batches maxWait after the first item arrived. yield batch.put(item) blocks while a formed batch is still waiting to be taken (back-pressure) unless unbounded; yield batch.take() resumes with items and isPartial. Statistics: batches formed, partial batches, average batch size, item wait, put wait, take wait. Works inside anyOf/allOf and is cleaned up on interrupt.
  • Example examples/batch-oven/.