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