Remote / foldkit-remote
coalesceReads
function · packages/remote/src/coalesce.ts:425
function coalesceReads(
read: BatchRead,
options?: ClientOptions,
): Effect.Effect<BatchRead>Wraps a raw batch read so that requirements are batched, cut to the
server's limits, and deduplicated. Every waiter receives the whole result
of each read it waited on; Remote.writeRead is idempotent, so writing it
more than once is harmless. A read nobody waits on any more is interrupted.