Skip to content

Interface: ScopeLockReaderBatchState ​

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

Reader-batch turn state coordinated on a handle's PQueue (concurrency: 1).

Groups concurrent shared-read callers that arrive while no exclusive writer is queued after the batch, holding a single PQueue concurrency slot until all readers in the batch release.

Properties ​

PropertyModifierTypeDescriptionDefined in
activeCountpublicnumberCount of currently active (granted and unreleased) readers belonging to this batch.runtime/locks/scope-lock-entry-state.ts:26
finishTurnpublic(() => void) | undefinedResolver callback that completes the batch's PQueue turn once activeCount drops to zero.runtime/locks/scope-lock-entry-state.ts:32
startedpublicbooleanTrue once the PQueue turn for this reader batch has begun executing.runtime/locks/scope-lock-entry-state.ts:24
waitControllerreadonlyAbortControllerController used to cancel the queued PQueue turn if all waiters abort or coalesce before start.runtime/locks/scope-lock-entry-state.ts:28
waitersreadonlySet<ScopeLockQueueWaiter>Set of pending reader waiters awaiting the start of this batch turn in PQueue.runtime/locks/scope-lock-entry-state.ts:30

Released under the MIT License.