Remote / foldkit-remote

coalesceReads

function · packages/remote/src/coalesce.ts:153

function coalesceReads(
  read: BatchRead,
  options?: CoalesceOptions,
): Effect.Effect<BatchRead>

Wraps a raw batch read so that requirements are batched and deduplicated. Every waiter receives the whole batch result; Remote.writeRead is idempotent, so writing it more than once is harmless.