Compartir a través de


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
);

Parameters

  • _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.

Requirements

Header: concurrent_priority_queue.h

Namespace: concurrency

See Also

Reference

concurrent_priority_queue Class