MCPcopy Create free account
hub / github.com/Effect-TS/effect / waitFor

Function waitFor

packages/cluster/test/Sharding.test.ts:1720–1725  ·  view source on GitHub ↗
(predicate: () => boolean)

Source from the content-addressed store, hash-verified

1718const ShutdownEntity = Entity.make("ShutdownEntity", [Rpc.make("Ping")])
1719
1720const waitFor = (predicate: () => boolean) =>
1721 Effect.gen(function*() {
1722 for (let i = 0; i < 30 && !predicate(); i++) {
1723 yield* TestClock.adjust(100)
1724 }
1725 })
1726
1727type HandoffStorage = ReturnType<typeof makeHandoffStorage>
1728

Callers 1

Sharding.test.tsFile · 0.85

Calls 2

adjustMethod · 0.65
predicateFunction · 0.50

Tested by

no test coverage detected