()
| 98 | } |
| 99 | |
| 100 | const close = () => { |
| 101 | if (state.closed) { |
| 102 | return |
| 103 | } |
| 104 | |
| 105 | state.closed = true |
| 106 | state.queue.length = 0 |
| 107 | state.queued.length = 0 |
| 108 | state.ctrl?.abort() |
| 109 | stop.resolve({ type: "closed" }) |
| 110 | finish() |
| 111 | } |
| 112 | |
| 113 | const drain = () => { |
| 114 | if (draining || state.closed || state.queue.length === 0) { |
no test coverage detected