export declare class ThreadLockError extends Error { readonly threadId: string; readonly ownerPid: number; constructor(threadId: string, ownerPid: number); } /** * Attempt to acquire a lock for the given thread. * Throws ThreadLockError if another live process holds the lock. * Reclaims stale locks from dead processes. */ export declare function acquireThreadLock(threadId: string): void; /** * Release the lock for the given thread (only if we own it). */ export declare function releaseThreadLock(threadId: string): void; /** * Check if a thread is locked by another process. * Returns the PID of the owner if locked, null otherwise. */ export declare function getThreadLockOwner(threadId: string): number | null; /** * Release all thread locks owned by this process. * Call this on process exit. */ export declare function releaseAllThreadLocks(): void; //# sourceMappingURL=thread-lock.d.ts.map