/** * YuiHub V1 Backend - Lock Utilities * ReadWriteLock for LanceDB concurrency control */ import { RWLock } from 'async-rwlock'; export declare const rwLock: RWLock; /** * Execute function with write lock (exclusive) * Use for: /save, /checkpoints, indexing */ export declare function withWriteLock(fn: () => Promise): Promise; /** * Execute function with read lock (shared) * Use for: /search, /export/context */ export declare function withReadLock(fn: () => Promise): Promise; /** * Execute function with exponential backoff retry */ export declare function withRetry(fn: () => Promise, maxRetries?: number, baseDelayMs?: number): Promise; import { Mutex } from 'async-mutex'; /** @deprecated Use withWriteLock instead */ export declare const globalMutex: Mutex; //# sourceMappingURL=lock.d.ts.map