MCPcopy Create free account
hub / github.com/cameron314/concurrentqueue / internal_empty

Method internal_empty

benchmarks/tbb/concurrent_queue.cpp:525–530  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

523}
524
525bool concurrent_queue_base_v3::internal_empty() const {
526 ticket tc = my_rep->tail_counter;
527 ticket hc = my_rep->head_counter;
528 // if tc!=r.tail_counter, the queue was not empty at some point between the two reads.
529 return ( tc==my_rep->tail_counter && ptrdiff_t(tc-hc-my_rep->n_invalid_entries)<=0 );
530}
531
532void concurrent_queue_base_v3::internal_set_capacity( ptrdiff_t capacity, size_t /*item_sz*/ ) {
533 my_capacity = capacity<0 ? concurrent_queue_rep::infinite_capacity : capacity;

Callers 1

emptyMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected