MCPcopy
hub / github.com/coder/mux / push

Method push

vscode/src/webview/createVscodeOrpcLink.ts:141–158  ·  view source on GitHub ↗
(value: T)

Source from the content-addressed store, hash-verified

139 }
140
141 push(value: T): void {
142 if (this.done) {
143 return;
144 }
145
146 const waiter = this.pending.shift();
147 if (waiter) {
148 waiter.resolve({ value, done: false });
149 return;
150 }
151
152 if (this.buffered.length >= this.maxBufferedStreamEvents) {
153 this.cancel(`buffer overflow (maxBufferedStreamEvents=${this.maxBufferedStreamEvents})`);
154 return;
155 }
156
157 this.buffered.push(value);
158 }
159
160 end(): void {
161 if (this.done) {

Callers

nothing calls this directly

Calls 3

cancelMethod · 0.95
resolveMethod · 0.80
pushMethod · 0.65

Tested by

no test coverage detected