Skip to content

Interface: ScopeLockEntryState ​

Defined in: runtime/locks/scope-lock-entry-state.ts:54

Per-handle read/write lock state tracked by ScopeLockManager.

Coordinates exclusive writer turns and shared reader-batch turns via a single-concurrency PQueue (concurrency: 1) with writer-preference fairness and automatic idle eviction.

Properties ​

PropertyModifierTypeDescriptionDefined in
activeReaderBatchpublicScopeLockReaderBatchState | undefinedCurrently executing reader batch occupying the queue slot, if any.runtime/locks/scope-lock-entry-state.ts:68
activeReaderspublicnumberNumber of currently active shared-read leases held on this scope handle.runtime/locks/scope-lock-entry-state.ts:62
handlereadonlyunknownIsolation scope handle reference guarded by this lock entry.runtime/locks/scope-lock-entry-state.ts:56
openReaderBatchpublicScopeLockReaderBatchState | undefinedOpen reader batch accepting new concurrent readers when no writer is queued after it.runtime/locks/scope-lock-entry-state.ts:70
pendingWriterspublicnumberNumber of exclusive writers currently queued in queue awaiting their turn.runtime/locks/scope-lock-entry-state.ts:66
queuereadonlyPQueueSingle-concurrency PQueue (concurrency: 1) serializing writer turns and reader-batch turns.runtime/locks/scope-lock-entry-state.ts:58
queuedTurnsreadonlyScopeLockQueuedTurn[]Ordered list of pending writer and reader-batch turns currently queued in queue.runtime/locks/scope-lock-entry-state.ts:60
writerActivepublicbooleanTrue when an exclusive-write lease is currently held on this scope handle.runtime/locks/scope-lock-entry-state.ts:64

Released under the MIT License.