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

Method wait

Server/src/safeQueue.hpp:192–198  ·  view source on GitHub ↗

* new method to wait for the mutex lock. When the queue is empty the lock is on. * calling this method will cause the caller to block until there are new entries */

Source from the content-addressed store, hash-verified

190 * calling this method will cause the caller to block until there are new entries
191 */
192 bool wait() {
193 while (size() <= 0) {
194 usleep(10000);
195 }
196
197 return true;
198 }
199
200 void setLimit(uint32_t limit) {
201 this->limit = limit;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected