#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. | |
| 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 | |
| class | internal::concurrent_queue_iterator |
Multiple threads may each push and pop concurrently. Assignment construction is not allowed.
| bool tbb::strict_ppl::concurrent_queue< T, A >::try_pop | ( | T & | result | ) | [inline] |
Attempt to dequeue an item from head of queue.
Does not wait for item to become available. Returns true if successful; false otherwise.