/** 轮询节拍。250ms:比人感知门槛粗、比最短真等待窗(壳重启窗 1-3s)细一个数量级。 */ export declare const STORE_LOCK_POLL_MS = 250; /** 进入等待腿时的**一次性**披露(不刷屏:结构上只在第一次撞锁时调一次,不是靠一个 flag 挡)。 */ export type StoreLockWaitSink = (fields: { readonly ownerPid: number; readonly dir: string; readonly waitMs: number; }) => void; /** 时钟两面。`sleep` 是**同步**的(理由见顶注);两面都是形参,判据不靠真时间。 */ export interface StoreLockWaitClock { now(): number; sleep(ms: number): void; } /** * 取数据根(= 跑一次 `construct()`);撞上活持锁人且窗为正 ⇒ 在窗内反复重取,到窗仍取不到 ⇒ 原码 fatal。 * * @param construct 取数据根的那一次构造(本仓唯一调用点:`store-backend.ts` 的 local 臂,它在那里构造 `FileStorageBackend`)。 * **必须**可重入:core 先取锁后建店,取不到时零副作用(顶注已亲读核实)。 * @param waitMs `STORE_LOCK_WAIT_MS`。`> 0` 才等;`0` / 非数 ⇒ 7.93.0 的当场拒逐字同形。 * @param onWait 进入等待腿的一次性披露口。 */ export declare function acquireLocalBackendWithWait(construct: () => T, waitMs: number, onWait: StoreLockWaitSink, clock?: StoreLockWaitClock): T; //# sourceMappingURL=store-lock-wait.d.ts.map