(task: Task)
| 65 | } |
| 66 | |
| 67 | private async drain(task: Task): Promise<void> { |
| 68 | this.processing = true; |
| 69 | try { |
| 70 | await this.processOne(task); |
| 71 | while (this.queue.length > 0) { |
| 72 | const next = this.queue.shift()!; |
| 73 | await this.processOne(next); |
| 74 | } |
| 75 | } finally { |
| 76 | this.processing = false; |
| 77 | } |
| 78 | } |
| 79 | |
| 80 | private async processOne(task: Task): Promise<void> { |
| 81 | try { |
no test coverage detected