Qore Programming Language Reference Manual
0.9.1
|
The Sequence class implements a thread-safe increment-only object. More...
Public Member Methods | |
constructor () | |
Creates a new Sequence object. More... | |
constructor (softint start) | |
Creates a new Sequence object with a starting value. More... | |
copy () | |
Creates a new Sequence object, not based on the original. More... | |
int | getCurrent () |
Returns the current value of the sequence. More... | |
int | next () |
Atomically increments the sequence value and returns the last value. More... | |
The Sequence class implements a thread-safe increment-only object.
This class does not block therefore is not tagged with Qore::PO_NO_THREAD_CLASSES
Qore::Thread::Sequence::constructor | ( | ) |
Creates a new Sequence object.
Qore::Thread::Sequence::constructor | ( | softint | start | ) |
Creates a new Sequence object with a starting value.
Qore::Thread::Sequence::copy | ( | ) |
Creates a new Sequence object, not based on the original.
int Qore::Thread::Sequence::getCurrent | ( | ) |
Returns the current value of the sequence.
int Qore::Thread::Sequence::next | ( | ) |
Atomically increments the sequence value and returns the last value.