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

Method pushLossless

src/remote/appServer/client.ts:198–209  ·  view source on GitHub ↗
(value: T)

Source from the content-addressed store, hash-verified

196 }
197
198 pushLossless(value: T): boolean {
199 if (this.closed) {
200 return false
201 }
202 const waiter = this.waiters.shift()
203 if (waiter) {
204 waiter(value)
205 return true
206 }
207 this.queue.push(value)
208 return true
209 }
210
211 next(): Promise<T | undefined> {
212 if (this.queue.length > 0) {

Callers 2

enqueueEventMethod · 0.80
closeMethod · 0.80

Calls 1

shiftMethod · 0.80

Tested by

no test coverage detected