Qore Programming Language Reference Manual 1.17.0
Loading...
Searching...
No Matches
QC_Queue.dox.h
1
2namespace Qore {
4namespace Thread {
6
22class Queue {
23
24public:
26
31nothing clear();
32
33public:
35
44
45public:
47
60 constructor(int max = -1);
61
62public:
64/***/
66
67public:
69
75
76public:
78
90bool empty();
91
92public:
94
112auto get(timeout timeout_ms = 0);
113
114public:
116
131
132public:
134
147
148public:
150
163
164public:
166
178nothing insert(auto arg, timeout timeout_ms = 0);
179
180public:
182
192int max();
193
194public:
196
214auto pop(timeout timeout_ms = 0);
215
216public:
218
237nothing push(auto arg, timeout timeout_ms = 0);
238
239public:
241
256 setError(string err, string desc);
257
258public:
260
270int size();
271};
272}
273}
Queue objects provide a blocking, thread-safe message-passing object to Qore programs
Definition: QC_Queue.dox.h:22
auto get(timeout timeout_ms=0)
Blocks until at least one entry is available on the queue, then returns the first entry in the queue....
destructor()
Destroys the Queue object.
int size()
Returns the number of elements in the Queue.
int getWaiting()
Returns the number of threads currently blocked on this queue for reading.
auto pop(timeout timeout_ms=0)
Blocks until at least one entry is available on the queue, then returns the last entry in the queue....
nothing clear()
Clears the Queue of all data.
clearError()
clears the error setting from the Queue; if error information is set, then after this call,...
int max()
Returns the upper limit of the number of elements in the Queue.
nothing push(auto arg, timeout timeout_ms=0)
Pushes a value on the end of the queue.
int getReadWaiting()
Returns the number of threads currently blocked on this queue for reading.
setError(string err, string desc)
sets an error status on the Queue and clears the Queue; while a Queue object has an error status,...
constructor(int max=-1)
Creates the Queue object.
int getWriteWaiting()
Returns the number of threads currently blocked on this queue for writing.
bool empty()
Returns True if the Queue is empty, False if not.
copy()
Creates a new Queue object with the same elements and maximum size as the original.
nothing insert(auto arg, timeout timeout_ms=0)
Inserts a value at the beginning of the queue.
Qore namespace.
Definition: QC_AbstractSmartLock.dox.h:2