MCPcopy Create free account
hub / github.com/Noumena-Network/code / next

Method next

src/remote/appServer/client.ts:211–219  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

209 }
210
211 next(): Promise<T | undefined> {
212 if (this.queue.length > 0) {
213 return Promise.resolve(this.queue.shift())
214 }
215 if (this.closed) {
216 return Promise.resolve(undefined)
217 }
218 return new Promise(resolve => this.waiters.push(resolve))
219 }
220
221 close(): void {
222 if (this.closed) {

Callers 1

nextEventMethod · 0.45

Calls 2

resolveMethod · 0.80
shiftMethod · 0.80

Tested by

no test coverage detected