MCPcopy Create free account
hub / github.com/experdot/pointer / runSerialized

Function runSerialized

src/renderer/src/services/switchTransactionService.ts:16–23  ·  view source on GitHub ↗
(task: () => Promise<T>)

Source from the content-addressed store, hash-verified

14let switchLock: Promise<void> = Promise.resolve()
15
16function runSerialized<T>(task: () => Promise<T>): Promise<T> {
17 const next = switchLock.then(task, task)
18 switchLock = next.then(
19 () => undefined,
20 () => undefined
21 )
22 return next
23}
24
25async function resetVolatileStores(): Promise<void> {
26 stores.message.reset()

Callers 1

runSwitchTransactionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected