@maschinenlesbar.org/openka-cli
    Preparing search index...

    Interface LockCorpusOptions

    interface LockCorpusOptions {
        onWaiting?: (held: CorpusLockedError) => void;
        pollMs?: number;
        signal?: AbortSignal;
        sleep?: (ms: number, signal?: AbortSignal) => Promise<void>;
        wait?: boolean;
    }
    Index
    onWaiting?: (held: CorpusLockedError) => void

    Called once, when the first attempt finds the lock held and waiting begins.

    pollMs?: number

    How often a waiting caller tries again (default LOCK_POLL_MS).

    signal?: AbortSignal

    Stop waiting: the CorpusLockedError is thrown then.

    sleep?: (ms: number, signal?: AbortSignal) => Promise<void>

    Injectable for tests; the default sleeps with a timer that signal cuts short.

    wait?: boolean

    While another run holds the lock, wait for it instead of throwing CorpusLockedError — what a queue of syncs wants. Checked every pollMs.