Framework
SerialTransactionQueue
Class: SerialTransactionQueue
Serial mode queue for serializing transactions within the process.
Constructors
new SerialTransactionQueue()
new SerialTransactionQueue(): SerialTransactionQueueReturns
Methods
clear()
clear(): voidClear the queue (for testing/shutdown).
Returns
void
enqueue()
enqueue<T>(fn): Promise<T>Enqueue a transaction for serial execution.
Type Parameters
| Type Parameter |
|---|
T |
Parameters
| Parameter | Type |
|---|---|
fn | () => Promise<T> |
Returns
Promise<T>
isEmpty()
isEmpty(): booleanCheck if the queue is empty.
Returns
boolean
