(n: number)
| 2205 | } |
| 2206 | |
| 2207 | pollUpTo(n: number): Array<A> { |
| 2208 | const builder: Array<A> = [] |
| 2209 | let i = 0 |
| 2210 | while (i !== n) { |
| 2211 | const a = this.poll() |
| 2212 | if (a === MutableList.Empty) { |
| 2213 | i = n |
| 2214 | } else { |
| 2215 | builder.push(a) |
| 2216 | i += 1 |
| 2217 | } |
| 2218 | } |
| 2219 | return builder |
| 2220 | } |
| 2221 | |
| 2222 | unsubscribe(): void { |
| 2223 | if (!this.unsubscribed) { |