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

Method wake

packages/effect/src/ui/Query.ts:631–645  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

629 | undefined
630 let last: Item | undefined
631 const wake = () => {
632 if (resume === undefined) return
633 const r = resume
634 if (pending.length > 0) {
635 resume = undefined
636 r(
637 Effect.succeed(
638 pending.splice(0) as [Item, ...Array<Item>]
639 )
640 )
641 } else if (failed !== undefined) {
642 resume = undefined
643 r(Effect.failCause(failed))
644 }
645 }
646 const offer = (result: Item): void => {
647 if (failed !== undefined) return
648 if (

Callers 9

buildFunction · 0.45
startMethod · 0.45
dueFunction · 0.45
writingMethod · 0.45
deferFunction · 0.45
againFunction · 0.45
dueFunction · 0.45
startFunction · 0.45
settledFunction · 0.45

Calls 1

succeedMethod · 0.45

Tested by

no test coverage detected