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

Method try_dequeue_bulk

include/dmlc/concurrentqueue.h:1153–1163  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1151 // Never allocates. Thread-safe.
1152 template<typename It>
1153 size_t try_dequeue_bulk(It itemFirst, size_t max) {
1154 size_t count = 0;
1155 for (auto ptr = producerListTail.load(std::memory_order_acquire);
1156 ptr != nullptr; ptr = ptr->next_prod()) {
1157 count += ptr->dequeue_bulk(itemFirst, max - count);
1158 if (count == max) {
1159 break;
1160 }
1161 }
1162 return count;
1163 }
1164
1165 // Attempts to dequeue several elements from the queue using an explicit consumer token.
1166 // Returns the number of items actually dequeued.

Callers

nothing calls this directly

Calls 2

next_prodMethod · 0.80
dequeue_bulkMethod · 0.45

Tested by

no test coverage detected