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

Function notify

packages/effect/src/ui/Query.ts:5347–5355  ·  view source on GitHub ↗
(listeners: ReadonlySet<(a: A) => void>, a: A)

Source from the content-addressed store, hash-verified

5345 }
5346 }
5347 const notify = <A>(listeners: ReadonlySet<(a: A) => void>, a: A): void => {
5348 for (const listener of Array.from(listeners)) {
5349 try {
5350 listener(a)
5351 } catch {
5352 // A listener can't change what the cache does.
5353 }
5354 }
5355 }
5356 /** Taken before any resumes: a caller resumed here can run before this returns, and call again. */
5357 const resumeAll = <A>(
5358 waiters: Set<{ readonly resume: (exit: Exit.Exit<A, any>) => void }>,

Callers 4

emitFetchFunction · 0.70
cacheEnvFunction · 0.70
startFetchFunction · 0.70
eventFunction · 0.70

Calls 2

fromMethod · 0.80
listenerFunction · 0.70

Tested by

no test coverage detected