MCPcopy Create free account
hub / github.com/cameron314/concurrentqueue / try_pop

Function try_pop

benchmarks/tbb/concurrent_priority_queue.h:243–248  ·  view source on GitHub ↗

Gets a reference to and removes highest priority element If a highest priority element was found, sets elem and returns true, otherwise returns false. This operation can be safely used concurrently with other push, try_pop or emplace operations. */

Source from the content-addressed store, hash-verified

241 otherwise returns false.
242 This operation can be safely used concurrently with other push, try_pop or emplace operations. */
243 bool try_pop(reference elem) {
244 cpq_operation op_data(POP_OP);
245 op_data.elem = &elem;
246 my_aggregator.execute(&op_data);
247 return op_data.status==SUCCEEDED;
248 }
249
250 //! Clear the queue; not thread-safe
251 /** This operation is unsafe if there are pending concurrent operations on the queue.

Callers

nothing calls this directly

Calls 1

executeMethod · 0.45

Tested by

no test coverage detected