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

Function resumeAll

packages/effect/src/ui/Query.ts:5357–5365  ·  view source on GitHub ↗
(
    waiters: Set<{ readonly resume: (exit: Exit.Exit<A, any>) => void }>,
    exit: Exit.Exit<A, any>
  )

Source from the content-addressed store, hash-verified

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 }>,
5359 exit: Exit.Exit<A, any>
5360 ): void => {
5361 if (waiters.size === 0) return
5362 const taken = Array.from(waiters)
5363 waiters.clear()
5364 for (const waiter of taken) waiter.resume(exit)
5365 }
5366
5367 // -- registry and index -----------------------------------------------------
5368 /** First wins: the first definition under a name pins everything about the query. */

Callers 5

revertFunction · 0.85
onFetchExitFunction · 0.85
endSharedFunction · 0.85
dehydrateFunction · 0.85
buildCacheFunction · 0.85

Calls 3

fromMethod · 0.80
clearMethod · 0.65
resumeMethod · 0.65

Tested by

no test coverage detected