concurrent_priority_queue::try_pop Method

Removes and returns the highest priority element from the queue if the queue is non-empty. This method is concurrency-safe.

bool try_pop(
   reference _Elem


  • _Elem
    A reference to a variable that will be populated with the highest priority element, if the queue is non-empty.

Return Value

true if a value was popped, false otherwise.


Header: concurrent_priority_queue.h

Namespace: concurrency

See Also


concurrent_priority_queue Class