MCPcopy
hub / github.com/anomalyco/opencode / push

Method push

packages/opencode/src/util/queue.ts:5–9  ·  view source on GitHub ↗
(item: T)

Source from the content-addressed store, hash-verified

3 private resolvers: ((value: T) => void)[] = []
4
5 push(item: T) {
6 const resolve = this.resolvers.shift()
7 if (resolve) resolve(item)
8 else this.queue.push(item)
9 }
10
11 async next(): Promise<T> {
12 if (this.queue.length > 0) return this.queue.shift()!

Callers 15

effect.test.tsFile · 0.80
promise.test.tsFile · 0.80
api.tsFile · 0.80
AppFunction · 0.80
checkMacosAppFunction · 0.80
emitDeepLinksFunction · 0.80
upsertFunction · 0.80
checkForUpdatesFunction · 0.80
downloadUpdateFunction · 0.80
quitAndInstallFunction · 0.80
setupFunction · 0.80

Calls 1

resolveFunction · 0.70

Tested by 15

checkForUpdatesFunction · 0.64
downloadUpdateFunction · 0.64
quitAndInstallFunction · 0.64
setupFunction · 0.64
tempRootFunction · 0.64
HarnessFunction · 0.64
ProbeFunction · 0.64
sendPromptFunction · 0.64
notifyFunction · 0.64
setupFunction · 0.64
setTerminalTitleFunction · 0.64
destroyFunction · 0.64