MCPcopy Create free account
hub / github.com/freecodexyz/free-code / enqueue

Method enqueue

src/utils/stream.ts:38–47  ·  view source on GitHub ↗
(value: T)

Source from the content-addressed store, hash-verified

36 }
37
38 enqueue(value: T): void {
39 if (this.readResolve) {
40 const resolve = this.readResolve
41 this.readResolve = undefined
42 this.readReject = undefined
43 resolve({ done: false, value })
44 } else {
45 this.queue.push(value)
46 }
47 }
48
49 done() {
50 this.isDone = true

Callers 5

startFunction · 0.45
closeToolCallBlockFunction · 0.45
emitTextBlockFunction · 0.45
finishStreamFunction · 0.45

Calls 1

resolveFunction · 0.70

Tested by

no test coverage detected