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

Function size_approx

Source/ThirdParty/concurrentqueue.h:1121–1128  ·  view source on GitHub ↗

Returns an estimate of the total number of elements currently in the queue. This estimate is only accurate if the queue has completely stabilized before it is called (i.e. all enqueue and dequeue operations have completed and their memory effects are visible on the calling thread, and no further operations start while this method is being called). Thread-safe.

Source from the content-addressed store, hash-verified

1119 // being called).
1120 // Thread-safe.
1121 size_t size_approx() const
1122 {
1123 size_t size = 0;
1124 for (auto ptr = producerListTail.load(std::memory_order_acquire); ptr != nullptr; ptr = ptr->next_prod()) {
1125 size += ptr->size_approx();
1126 }
1127 return size;
1128 }
1129
1130
1131 // Returns true if the underlying atomic variables used by

Callers 1

CountMethod · 0.85

Calls 3

loadMethod · 0.45
next_prodMethod · 0.45
size_approxMethod · 0.45

Tested by

no test coverage detected