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

Method try_dequeue

include/dmlc/blockingconcurrentqueue.h:696–705  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

694 // Never allocates. Thread-safe.
695 template<typename U>
696 inline bool try_dequeue(U& item)
697 {
698 if (sema->tryWait()) {
699 while (!inner.try_dequeue(item)) {
700 continue;
701 }
702 return true;
703 }
704 return false;
705 }
706
707 // Attempts to dequeue from the queue using an explicit consumer token.
708 // Returns false if all producer streams appeared empty at the time they

Callers 2

wait_dequeueMethod · 0.45
wait_dequeue_timedMethod · 0.45

Calls 1

tryWaitMethod · 0.80

Tested by

no test coverage detected