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

    Interface LockableStore

    Exclusive write access to a corpus. Optional: a store that cannot be shared (the in-memory test double) has nothing to lock.

    interface LockableStore {
        lock?(purpose: string): () => void;
    }

    Hierarchy (View Summary)

    Index
    • Take the corpus for writing, or throw CorpusLockedError when another run holds it. Returns the release. Re-entrant within one store object, so a writer may call another writer; withCorpusLock is the usual way in.

      Parameters

      • purpose: string

      Returns () => void