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

Method TryPop

include/singa/utils/safe_queue.h:159–167  ·  view source on GitHub ↗

* Try to pop an element from the queue. * @return false if the queue is empty now. */

Source from the content-addressed store, hash-verified

157 * @return false if the queue is empty now.
158 */
159 bool TryPop(T& e) {
160 Element ele;
161 if (queue_.TryPop(ele)) {
162 e = ele.data;
163 return true;
164 } else {
165 return false;
166 }
167 }
168
169 /**
170 * @return Number of elements in the queue.

Callers

nothing calls this directly

Calls 1

TryPopMethod · 0.45

Tested by

no test coverage detected