MCPcopy Index your code
hub / github.com/codeaashu/claude-code / scheduleDrain

Method scheduleDrain

src/utils/sessionStorage.ts:618–632  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

616 }
617
618 private scheduleDrain(): void {
619 if (this.flushTimer) {
620 return
621 }
622 this.flushTimer = setTimeout(async () => {
623 this.flushTimer = null
624 this.activeDrain = this.drainWriteQueue()
625 await this.activeDrain
626 this.activeDrain = null
627 // If more items arrived during drain, schedule again
628 if (this.writeQueues.size > 0) {
629 this.scheduleDrain()
630 }
631 }, this.FLUSH_INTERVAL_MS)
632 }
633
634 private async appendToFile(filePath: string, data: string): Promise<void> {
635 try {

Callers 1

enqueueWriteMethod · 0.95

Calls 1

drainWriteQueueMethod · 0.95

Tested by

no test coverage detected