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

Function defer

packages/effect/src/ui/Query.ts:5317–5324  ·  view source on GitHub ↗
(f: () => void)

Source from the content-addressed store, hash-verified

5315 )
5316 /** Runs `f` one scheduler step later. */
5317 const defer = (f: () => void): void => {
5318 runFork(
5319 Effect.andThen(
5320 Effect.yieldNow,
5321 Effect.sync(() => disposed ? undefined : f())
5322 )
5323 )
5324 }
5325 /** A `Clock` sleep. Returns its cancel. */
5326 const timer = (ms: number, f: () => void): () => void => {
5327 const fiber: Fiber.Fiber<any, any> = runFork(Effect.andThen(

Callers 1

armIntervalFunction · 0.70

Calls 3

runForkFunction · 0.85
fFunction · 0.50
syncMethod · 0.45

Tested by

no test coverage detected