MCPcopy Index your code
hub / github.com/anomalyco/opencode / next

Method next

packages/opencode/src/util/queue.ts:11–14  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

9 }
10
11 async next(): Promise<T> {
12 if (this.queue.length > 0) return this.queue.shift()!
13 return new Promise((resolve) => this.resolvers.push(resolve))
14 }
15
16 async *[Symbol.asyncIterator]() {
17 while (true) yield await this.next()

Callers 9

firstEventFunction · 0.45
readEventFunction · 0.45
NearestRootFunction · 0.45
StrictNearestRootFunction · 0.45
server.tsFile · 0.45
resolveBinFunction · 0.45
nextTuiRequestFunction · 0.45
nextTuiResponseFunction · 0.45

Calls 1

pushMethod · 0.80

Tested by 2

firstEventFunction · 0.36
readEventFunction · 0.36