A high-performance thread-safe non-blocking concurrent queue. More...
#include <concurrent_queue.h>
 
  
 | Public Types | |
| typedef T | value_type | 
| Element type in the queue. | |
| typedef T & | reference | 
| Reference type. | |
| typedef const T & | const_reference | 
| Const reference type. | |
| typedef size_t | size_type | 
| Integral type for representing size of the queue. | |
| typedef ptrdiff_t | difference_type | 
| Difference type for iterator. | |
| typedef A | allocator_type | 
| Allocator type. | |
| typedef internal::concurrent_queue_iterator < concurrent_queue, T > | iterator | 
| typedef internal::concurrent_queue_iterator < concurrent_queue, const T > | const_iterator | 
| Public Member Functions | |
| concurrent_queue (const allocator_type &a=allocator_type()) | |
| Construct empty queue. | |
| template<typename InputIterator > | |
| concurrent_queue (InputIterator begin, InputIterator end, const allocator_type &a=allocator_type()) | |
| [begin,end) constructor | |
| concurrent_queue (const concurrent_queue &src, const allocator_type &a=allocator_type()) | |
| Copy constructor. | |
| ~concurrent_queue () | |
| Destroy queue. | |
| void | push (const T &source) | 
| Enqueue an item at tail of queue. | |
| bool | try_pop (T &result) | 
| Attempt to dequeue an item from head of queue.  More... | |
| size_type | unsafe_size () const | 
| Return the number of items in the queue; thread unsafe. | |
| bool | empty () const | 
| Equivalent to size()==0. | |
| void | clear () | 
| Clear the queue. not thread-safe. | |
| allocator_type | get_allocator () const | 
| Return allocator object. | |
| iterator | unsafe_begin () | 
| iterator | unsafe_end () | 
| const_iterator | unsafe_begin () const | 
| const_iterator | unsafe_end () const | 
| Friends | |
| template<typename Container , typename Value > | |
| class | internal::concurrent_queue_iterator | 
A high-performance thread-safe non-blocking concurrent queue.
Multiple threads may each push and pop concurrently. Assignment construction is not allowed.
| 
 | inline | 
Attempt to dequeue an item from head of queue.
Does not wait for item to become available. Returns true if successful; false otherwise.