Qore Programming Language Reference Manual  0.8.13.5
 All Classes Namespaces Functions Variables Groups Pages
QC_Queue.dox.h
1 namespace Qore::Thread {
4 
15 class Queue {
16 
17 public:
19 
24 nothing clear();
25 
26 public:
28 
36  clearError();
37 
38 public:
40 
51  constructor(int max = -1);
52 
53 public:
55 /***/
56  copy();
57 
58 public:
60 
64  destructor();
65 
66 public:
68 
80 bool empty();
81 
82 public:
84 
96 auto get(timeout timeout_ms = 0);
97 
98 public:
100 
114 int getReadWaiting();
115 
116 public:
118 
130 int getWaiting();
131 
132 public:
134 
146 int getWriteWaiting();
147 
148 public:
150 
161 nothing insert(auto arg, timeout timeout_ms = 0);
162 
163 public:
165 
175 int max();
176 
177 public:
179 
191 auto pop(timeout timeout_ms = 0);
192 
193 public:
195 
206 nothing push(auto arg, timeout timeout_ms = 0);
207 
208 public:
210 
225  setError(string err, string desc);
226 
227 public:
229 
239 int size();
240 };
241 };
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:15
destructor()
Destroys the Queue object.
int getWriteWaiting()
Returns the number of threads currently blocked on this queue for writing.
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.