()
| 71 | }); |
| 72 | |
| 73 | const emptyQueue = () => { |
| 74 | if (listening) { |
| 75 | listening = false; |
| 76 | subscription.unsubscribe(); |
| 77 | for (const resolve of pullQueue) { |
| 78 | resolve({ value: undefined, done: true }); |
| 79 | } |
| 80 | pullQueue.length = 0; |
| 81 | pushQueue.length = 0; |
| 82 | } |
| 83 | }; |
| 84 | |
| 85 | return { |
| 86 | next() { |