MCPcopy Create free account
hub / github.com/SNAS/openbmp / front

Method front

Server/src/safeQueue.hpp:108–127  ·  view source on GitHub ↗

* front * Thread safe method that returns a copy of the front object * in the arg passed as value. * * ARGS: * value = Reference to allocated . * * RETURNS: * true if the value was updated, false if not */

Source from the content-addressed store, hash-verified

106 * true if the value was updated, false if not
107 */
108 bool front(type &value) {
109 bool rval = true;
110
111 // Lock
112 pthread_mutex_lock (&mutex);
113
114 // Before getting element, check if there are any
115 if (queue<type>::size() > 0) {
116
117 // get front
118 value = queue<type>::front();
119
120 } else
121 rval = false;
122
123 // Unlock
124 pthread_mutex_unlock (&mutex);
125
126 return rval;
127 }
128
129
130 /**

Callers 1

parseAttrLinkStateTLVMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected