MCPcopy Create free account
hub / github.com/dmlc/dmlc-core / wait_dequeue

Method wait_dequeue

include/dmlc/blockingconcurrentqueue.h:761–767  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

759 // Never allocates. Thread-safe.
760 template<typename U>
761 inline void wait_dequeue(U& item)
762 {
763 sema->wait();
764 while (!inner.try_dequeue(item)) {
765 continue;
766 }
767 }
768
769 // Blocks the current thread until either there's something to dequeue
770 // or the timeout (specified in microseconds) expires. Returns false

Callers 2

BlockingPullThreadFunction · 0.80
runMethod · 0.80

Calls 2

waitMethod · 0.45
try_dequeueMethod · 0.45

Tested by 1

BlockingPullThreadFunction · 0.64