concurrent_queue Class
The concurrent_queue class is a sequence container class that allows first-in, first-out access to its elements. It enables a limited set of concurrency-safe operations, such as push and try_pop.
template< typename _Ty, class _Ax > class concurrent_queue: public ::Concurrency::details::_Concurrent_queue_base_v4;
|
Name |
Description |
|---|---|
|
allocator_type |
A type that represents the allocator class for the concurrent queue. |
|
const_iterator |
A type that represents a non-thread-safe const iterator over elements in a concurrent queue. |
|
const_reference |
A type that provides a reference to a const element stored in a concurrent queue for reading and performing const operations. |
|
difference_type |
A type that provides the signed distance between two elements in a concurrent queue. |
|
iterator |
A type that represents a non-thread-safe iterator over the elements in a concurrent queue. |
|
reference |
A type that provides a reference to an element stored in a concurrent queue. |
|
size_type |
A type that counts the number of elements in a concurrent queue. |
|
value_type |
A type that represents the data type stored in a concurrent queue. |
|
Name |
Description |
|---|---|
|
Clears the concurrent queue, destroying any currently enqueued elements. This method is not concurrency-safe. |
|
|
Tests if the concurrent queue is empty at the moment this method is called. This method is concurrency-safe. |
|
|
Returns a copy of the allocator used to construct the concurrent queue. This method is concurrency-safe. |
|
|
Overloaded. Enqueues an item at tail end of the concurrent queue. This method is concurrency-safe. |
|
|
Dequeues an item from the queue if one is available. This method is concurrency-safe. |
|
|
Overloaded. Returns an iterator of type iterator or const_iterator to the beginning of the concurrent queue. This method is not concurrency-safe. |
|
|
Overloaded. Returns an iterator of type iterator or const_iterator to the end of the concurrent queue. This method is not concurrency-safe. |
|
|
Returns the number of items in the queue. This method is not concurrency-safe. |
For more information, see Parallel Containers and Objects.