Qore Programming Language Reference Manual  0.9.4
QC_Queue.dox.h
1 namespace Qore {
4 namespace Thread {
6 
17 class Queue {
18 
19 public:
21 
26 nothing clear();
27 
28 public:
30 
38  clearError();
39 
40 public:
42 
53  constructor(int max = -1);
54 
55 public:
57 /***/
58  copy();
59 
60 public:
62 
66  destructor();
67 
68 public:
70 
82 bool empty();
83 
84 public:
86 
98 auto get(timeout timeout_ms = 0);
99 
100 public:
102 
116 int getReadWaiting();
117 
118 public:
120 
132 int getWaiting();
133 
134 public:
136 
148 int getWriteWaiting();
149 
150 public:
152 
163 nothing insert(auto arg, timeout timeout_ms = 0);
164 
165 public:
167 
177 int max();
178 
179 public:
181 
193 auto pop(timeout timeout_ms = 0);
194 
195 public:
197 
208 nothing push(auto arg, timeout timeout_ms = 0);
209 
210 public:
212 
227  setError(string err, string desc);
228 
229 public:
231 
241 int size();
242 };
243 }
244 }
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,...
nothing push(auto arg, timeout timeout_ms=0)
Pushes a value on the end of the queue.
int size()
Returns the number of elements in the Queue.
nothing insert(auto arg, timeout timeout_ms=0)
Inserts a value at the beginning of the queue.
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....
int max()
Returns the upper limit of the number of elements in the Queue.
bool empty()
Returns True if the Queue is empty, False if not.
constructor(int max=-1)
Creates the Queue object.
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,...
Queue objects provide a blocking, thread-safe message-passing object to Qore programs
Definition: QC_Queue.dox.h:17
destructor()
Destroys the Queue object.
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....
int getWriteWaiting()
Returns the number of threads currently blocked on this queue for writing.
main Qore-language namespace
Definition: Pseudo_QC_All.dox.h:3
copy()
Creates a new Queue object with the same elements and maximum size as the original.
int getWaiting()
Returns the number of threads currently blocked on this queue for reading.