@pwngh/economy-lab
    Preparing search index...

    Function createSubmitCoalescer

    • Wraps an economy's submit in batch coalescing. Per-call CallOptions cannot ride a shared batch, so a call that passes options bypasses the queue and submits directly — it keeps its exact semantics and simply forgoes the batching win.

      Parameters

      Returns SubmitCoalescer

      const coalesced = createSubmitCoalescer(economy, { maxBatch: 32 });
      // A burst of independent operations pays one database commit, each caller
      // still resolving with exactly its own outcome.
      const outcomes = await Promise.all(
      operations.map((operation) => coalesced.submit(operation)),
      );