MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / try_dequeue_bulk

Function try_dequeue_bulk

Source/ThirdParty/concurrentqueue.h:1027–1037  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1025 // Never allocates. Thread-safe.
1026 template<typename It>
1027 size_t try_dequeue_bulk(It itemFirst, size_t max)
1028 {
1029 size_t count = 0;
1030 for (auto ptr = producerListTail.load(std::memory_order_acquire); ptr != nullptr; ptr = ptr->next_prod()) {
1031 count += ptr->dequeue_bulk(itemFirst, max - count);
1032 if (count == max) {
1033 break;
1034 }
1035 }
1036 return count;
1037 }
1038
1039 // Attempts to dequeue several elements from the queue using an explicit consumer token.
1040 // Returns the number of items actually dequeued.

Callers 1

CancelAllMethod · 0.85

Calls 4

loadMethod · 0.45
next_prodMethod · 0.45
dequeue_bulkMethod · 0.45

Tested by

no test coverage detected