Class: StepContinuationQueue
Defined in: runtime/locks/step-continuation-queue.ts:10
Per-stepExecId asynchronous FIFO serialization queue for ContinuationFrame[] mutations (SPEC.md §3.7.2).
Coordinates all concurrent updates to a step's continuation call stack via a per-step PQueue (concurrency: 1) so sibling downward forks and speculative branches never overwrite each other in LedgerStore.updateContinuationStack.
Constructors
Constructor
new StepContinuationQueue(): StepContinuationQueue;Returns
StepContinuationQueue
Methods
clearStep()
clearStep(stepExecId): void;Defined in: runtime/locks/step-continuation-queue.ts:82
Clears and removes any PQueue entry tracked for stepExecId.
Invoked when a step execution reaches a terminal state and no further stack mutations can occur.
Parameters
| Parameter | Type | Description |
|---|---|---|
stepExecId | string | Step execution identifier to clear. |
Returns
void
enqueueUpdate()
enqueueUpdate<TResult>(
stepExecId,
task,
signal?
): Promise<TResult>;Defined in: runtime/locks/step-continuation-queue.ts:28
Enqueues task behind all prior updates for stepExecId and returns its completion promise.
Continues draining subsequent queued tasks for stepExecId even if an earlier task rejects or is cancelled via signal, and evicts the step's PQueue instance once idle.
Type Parameters
| Type Parameter | Description |
|---|---|
TResult | Return type of the queued update callback. |
Parameters
| Parameter | Type | Description |
|---|---|---|
stepExecId | string | Unique step execution identifier to serialize on. |
task | () => Promise<TResult> | Asynchronous continuation update callback. |
signal? | AbortSignal | Optional cancellation signal for queued updates. |
Returns
Promise<TResult>
Promise resolving or rejecting with the outcome of task.
hasStepQueue()
hasStepQueue(stepExecId): boolean;Defined in: runtime/locks/step-continuation-queue.ts:71
Checks whether stepExecId currently holds an active or queued PQueue instance.
Returns false once all pending and queued continuation updates for stepExecId have drained.
Parameters
| Parameter | Type | Description |
|---|---|---|
stepExecId | string | Step execution identifier to inspect. |
Returns
boolean
True when a non-evicted queue entry exists for stepExecId.