(filePath: string, entry: Entry)
| 606 | } |
| 607 | |
| 608 | private enqueueWrite(filePath: string, entry: Entry): Promise<void> { |
| 609 | return new Promise<void>(resolve => { |
| 610 | let queue = this.writeQueues.get(filePath) |
| 611 | if (!queue) { |
| 612 | queue = [] |
| 613 | this.writeQueues.set(filePath, queue) |
| 614 | } |
| 615 | queue.push({ entry, resolve }) |
| 616 | this.scheduleDrain() |
| 617 | }) |
| 618 | } |
| 619 | |
| 620 | private scheduleDrain(): void { |
| 621 | if (this.flushTimer) { |
no test coverage detected