concurrent_priority_queue Class
The concurrent_priority_queue class is a container that allows multiple threads to concurrently push and pop items. Items are popped in priority order where priority is determined by a functor supplied as a template argument.
template < typename _Ty, typename _Compare=std::less<_Ty>, typename _Ax = std::allocator<_Ty> > , typename _Ax = std::allocator<_Ty> > class concurrent_priority_queue;
|
Name |
Description |
|---|---|
|
allocator_type |
A type that represents the allocator class for the concurrent priority queue. |
|
const_reference |
A type that represents a const reference to an element of the type stored in a concurrent priority queue. |
|
reference |
A type that represents a reference to an element of the type stored in a concurrent priority queue. |
|
size_type |
A type that counts the number of elements in a concurrent priority queue. |
|
value_type |
A type that represents the data type stored in a concurrent priority queue. |
|
Name |
Description |
|---|---|
|
concurrent_priority_queue::concurrent_priority_queue Constructor |
Overloaded. Constructs a concurrent priority queue. |
|
Name |
Description |
|---|---|
|
Erases all elements in the concurrent priority. This method is not concurrency-safe. |
|
|
Tests if the concurrent priority queue is empty at the time this method is called. This method is concurrency-safe. |
|
|
Returns a copy of the allocator used to construct the concurrent priority queue. This method is concurrency-safe. |
|
|
Overloaded. Adds an element to the concurrent priority queue. This method is concurrency-safe. |
|
|
Returns the number of elements in the concurrent priority queue. This method is concurrency-safe. |
|
|
Swaps the contents of two concurrent priority queues. This method is not concurrency-safe. |
|
|
Removes and returns the highest priority element from the queue if the queue is non-empty. This method is concurrency-safe. |
For detailed information on the concurrent_priority_queue class, see Parallel Containers and Objects.