MCPcopy Create free account
hub / github.com/Noumena-Network/code / enqueueWrite

Method enqueueWrite

src/utils/sessionStorage.ts:644–654  ·  view source on GitHub ↗
(filePath: string, entry: Entry)

Source from the content-addressed store, hash-verified

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) {

Callers 1

appendEntryMethod · 0.95

Calls 3

scheduleDrainMethod · 0.95
setMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected