MCPcopy Create free account
hub / github.com/apache/singa / Push

Method Push

include/singa/utils/safe_queue.h:122–128  ·  view source on GitHub ↗

* Push an element into the queue with a given priority. * The queue should not be a priority queue. * @return true if success; otherwise false, e.g., due to capacity constraint. */

Source from the content-addressed store, hash-verified

120 * @return true if success; otherwise false, e.g., due to capacity constraint.
121 */
122 bool Push(const T& e, int priority) {
123 Element ele;
124 ele.data = e;
125 ele.priority = priority;
126 queue_.push(ele);
127 return true;
128 }
129
130 /**
131 * Pop an element from the queue with the highest priority.

Callers

nothing calls this directly

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected