(filePath: string, entry: Entry)
| 650 | } |
| 651 | |
| 652 | private enqueueWrite(filePath: string, entry: Entry): Promise<void> { |
| 653 | return new Promise<void>(resolve => { |
| 654 | let queue = this.writeQueues.get(filePath) |
| 655 | if (!queue) { |
| 656 | queue = [] |
| 657 | this.writeQueues.set(filePath, queue) |
| 658 | } |
| 659 | queue.push({ entry, resolve }) |
| 660 | this.scheduleDrain() |
| 661 | }) |
| 662 | } |
| 663 | |
| 664 | private scheduleDrain(): void { |
| 665 | if (this.flushTimer) { |
no test coverage detected