MCPcopy Index your code
hub / github.com/simstudioai/sim / flushUntil

Function flushUntil

apps/sim/app/_shell/providers/session-provider.test.tsx:126–131  ·  view source on GitHub ↗

Repeatedly flush until `predicate` holds or the budget runs out.

(predicate: () => boolean, attempts = 40)

Source from the content-addressed store, hash-verified

124
125/** Repeatedly flush until `predicate` holds or the budget runs out. */
126async function flushUntil(predicate: () => boolean, attempts = 40) {
127 for (let i = 0; i < attempts; i++) {
128 if (predicate()) return
129 await flush()
130 }
131}
132
133/** True when the getSession call is the upgrade (disableCookieCache) read. */
134function isUpgradeCall(arg: unknown): boolean {

Callers 1

Calls 1

flushFunction · 0.70

Tested by

no test coverage detected