template<typename T>
class pthread::util::sync_queue< T >
- Examples:
- synchronized_queue_tests.cpp.
Definition at line 43 of file sync_queue.hpp.
constructor
- Parameters
-
ms | max queue size (default is 10). |
Definition at line 234 of file sync_queue.hpp.
Get an item from the queue.
If the queue is empty, get waits for an item to be put.
- Parameters
-
item | item that will receive an item found onto the queue. |
Definition at line 154 of file sync_queue.hpp.
Get an item from the queue, if empty wait for one during duration milliseconds.
- Parameters
-
item | item that will receive an item found onto the queue. |
wait_time | duration we are willing to wait for a new item. |
- Exceptions
-
Definition at line 169 of file sync_queue.hpp.
- Returns
- maximun number of items that can be put in the queue
Definition at line 100 of file sync_queue.hpp.
Put an item in the queue.
If the queue max size is reached, then the operation waits until a size is smaller then max size again.
- Parameters
-
item | item to store in the queue |
Definition at line 193 of file sync_queue.hpp.
Put an item in the queue (wait if size >= max_size).
- Parameters
-
item | item to store in the queue |
wait_time | millis to wait for the queue to free a slo |
Definition at line 209 of file sync_queue.hpp.
change the maximum number of items that can be put in the queue.
- Parameters
-
Definition at line 109 of file sync_queue.hpp.
- Returns
- current number of elements in the queue
Definition at line 89 of file sync_queue.hpp.
The documentation for this class was generated from the following file: