ConvergenceDriver
Defined in: packages/client/src/convergence.ts:46
Properties
Section titled “Properties”requestPass
Section titled “requestPass”requestPass: () =>
void
Defined in: packages/client/src/convergence.ts:61
Request a convergence pass now — the event-driven path. The client calls this the moment a
mutation is enqueued, so a local write flushes immediately instead of waiting for the trigger’s
next interval tick. Coalesced exactly like a trigger signal (one pass at a time; a request mid-pass
queues a single follow-up) and still gated by shouldConverge(), so a write made while offline
stages without flushing. With this, the trigger’s interval is only a fallback (retries/recovery),
which lets it run far less often — the interval, not real convergence, is what costs idle CPU.
Returns
Section titled “Returns”void
start: () =>
void
Defined in: packages/client/src/convergence.ts:47
Returns
Section titled “Returns”void
stop: () =>
Promise<void>
Defined in: packages/client/src/convergence.ts:52
Stop scheduling and await any in-flight pass before resolving, so a caller can then safely close or wipe the underlying database without a pass racing against it. Idempotent.
Returns
Section titled “Returns”Promise<void>