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

Function buildClosed

packages/effect/src/ui/Query.ts:6101–6126  ·  view source on GitHub ↗
(build: Build)

Source from the content-addressed store, hash-verified

6099 startFetch(entry, fetch.trigger, build, true, false, parent, fetch.watcher)
6100 }
6101 function buildClosed(build: Build): void {
6102 attached.delete(build)
6103 if (disposed) return
6104 for (const entry of allEntries()) {
6105 const fetch = entry.fetch ?? entry.live
6106 if (fetch !== undefined && fetch.build === build) {
6107 replaceFetch(entry, fetch, fetch.parent)
6108 }
6109 }
6110 for (const shared of Array.from(sharedFetches)) {
6111 if (shared.build !== build) continue
6112 let next: Build | undefined
6113 for (const caller of shared.callers) {
6114 if (!caller.build.closed) {
6115 next = caller.build
6116 break
6117 }
6118 }
6119 if (next === undefined) {
6120 endShared(shared, Exit.interrupt())
6121 } else {
6122 shared.build = next
6123 runShared(shared, true)
6124 }
6125 }
6126 }
6127
6128 // -- caller-only fetches ----------------------------------------------------
6129 /** A fetcher call for its callers alone. A stream query's is its first element. */

Callers

nothing calls this directly

Calls 7

allEntriesFunction · 0.85
replaceFetchFunction · 0.85
endSharedFunction · 0.85
runSharedFunction · 0.85
fromMethod · 0.80
deleteMethod · 0.65
interruptMethod · 0.45

Tested by

no test coverage detected