MCPcopy Create free account
hub / github.com/davisking/dlib / pop

Method pop

dlib/bsp/bsp.h:307–329  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

305 }
306
307 bool pop (
308 msg_data& item
309 )
310 /*!
311 ensures
312 - if (this function returns true) then
313 - #item == the next thing from the queue
314 - else
315 - this object is disabled
316 !*/
317 {
318 auto_mutex lock(class_mutex);
319 while (data.size() == 0 && !disabled)
320 sig.wait();
321
322 if (disabled)
323 return false;
324
325 item = data.top().data;
326 data.pop();
327
328 return true;
329 }
330
331 bool pop (
332 msg_data& item,

Callers 2

receive_dataMethod · 0.45

Calls 3

sizeMethod · 0.45
waitMethod · 0.45
topMethod · 0.45

Tested by

no test coverage detected