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. */
| 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. |