(value: T)
| 33 | private err: unknown = null; |
| 34 | |
| 35 | push(value: T): void { |
| 36 | if (this.closed) return; |
| 37 | if (this.waiting) { |
| 38 | const w = this.waiting; |
| 39 | this.waiting = null; |
| 40 | w.resolve({ value, done: false }); |
| 41 | } else { |
| 42 | this.buffer.push(value); |
| 43 | } |
| 44 | } |
| 45 | |
| 46 | close(): void { |
| 47 | if (this.closed) return; |
no outgoing calls