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
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
activeReaderBatch | public | ScopeLockReaderBatchState | undefined | Currently executing reader batch occupying the queue slot, if any. | runtime/locks/scope-lock-entry-state.ts:68 |
activeReaders | public | number | Number of currently active shared-read leases held on this scope handle. | runtime/locks/scope-lock-entry-state.ts:62 |
handle | readonly | unknown | Isolation scope handle reference guarded by this lock entry. | runtime/locks/scope-lock-entry-state.ts:56 |
openReaderBatch | public | ScopeLockReaderBatchState | undefined | Open reader batch accepting new concurrent readers when no writer is queued after it. | runtime/locks/scope-lock-entry-state.ts:70 |
pendingWriters | public | number | Number of exclusive writers currently queued in queue awaiting their turn. | runtime/locks/scope-lock-entry-state.ts:66 |
queue | readonly | PQueue | Single-concurrency PQueue (concurrency: 1) serializing writer turns and reader-batch turns. | runtime/locks/scope-lock-entry-state.ts:58 |
queuedTurns | readonly | ScopeLockQueuedTurn[] | Ordered list of pending writer and reader-batch turns currently queued in queue. | runtime/locks/scope-lock-entry-state.ts:60 |
writerActive | public | boolean | True when an exclusive-write lease is currently held on this scope handle. | runtime/locks/scope-lock-entry-state.ts:64 |