(filePath: string, entry: Entry)
| 642 | } |
| 643 | |
| 644 | private enqueueWrite(filePath: string, entry: Entry): Promise<void> { |
| 645 | return new Promise<void>(resolve => { |
| 646 | let queue = this.writeQueues.get(filePath) |
| 647 | if (!queue) { |
| 648 | queue = [] |
| 649 | this.writeQueues.set(filePath, queue) |
| 650 | } |
| 651 | queue.push({ entry, resolve }) |
| 652 | this.scheduleDrain() |
| 653 | }) |
| 654 | } |
| 655 | |
| 656 | private scheduleDrain(): void { |
| 657 | if (this.flushTimer) { |
no test coverage detected