# tbb::strict_ppl::concurrent_queue< T, A > Class Template Reference
[Containers]

A high-performance thread-safe non-blocking concurrent queue. More...

`#include <concurrent_queue.h>`

List of all members.

## 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

## Detailed Description

### template<typename T, typename A = cache_aligned_allocator<T>>
class tbb::strict_ppl::concurrent_queue< T, A >

A high-performance thread-safe non-blocking concurrent queue.

Multiple threads may each push and pop concurrently. Assignment construction is not allowed.

## Member Function Documentation

template<typename T , typename A = cache_aligned_allocator<T>>

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.

The documentation for this class was generated from the following file:

- concurrent_queue.h

Copyright © 2005-2013 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its subsidiaries in the United States and other countries.

* Other names and brands may be claimed as the property of others.