Interface: AtomicSequence
Defined in: src/sdk/utils/atomic/AtomicSequence.ts:5
An generator of a sequence of consecutive integers that is guaranteed to not ever generate the same integer twice across all CoherentGT views.
Methods
getNext()
getNext():
number
Defined in: src/sdk/utils/atomic/AtomicSequence.ts:16
Gets the next integer in ascending order starting from zero. Each time this method is called, it is guaranteed to return a value that has not yet been returned by any other call to this method, including calls made in other CoherentGT views.
Note: The uniqueness guarantee outlined above is valid as long as the method returns a value less than or
equal to Number.MAX_SAFE_INTEGER
.
Returns
number
The smallest non-negative integer not yet returned by any invocation of this method across all CoherentGT views.