| 1749 | struct ExplicitProducer : public ProducerBase |
| 1750 | { |
| 1751 | explicit ExplicitProducer(ConcurrentQueue* parent_) : |
| 1752 | ProducerBase(parent_, true), |
| 1753 | blockIndex(nullptr), |
| 1754 | pr_blockIndexSlotsUsed(0), |
| 1755 | pr_blockIndexSize(EXPLICIT_INITIAL_INDEX_SIZE >> 1), |
| 1756 | pr_blockIndexFront(0), |
| 1757 | pr_blockIndexEntries(nullptr), |
| 1758 | pr_blockIndexRaw(nullptr) |
| 1759 | { |
| 1760 | size_t poolBasedIndexSize = details::ceil_to_pow_2(parent_->initialBlockPoolSize) >> 1; |
| 1761 | if (poolBasedIndexSize > pr_blockIndexSize) { |
| 1762 | pr_blockIndexSize = poolBasedIndexSize; |
| 1763 | } |
| 1764 | |
| 1765 | new_block_index(0); // This creates an index with double the number of current entries, i.e. EXPLICIT_INITIAL_INDEX_SIZE |
| 1766 | } |
| 1767 | |
| 1768 | ~ExplicitProducer() |
| 1769 | { |
nothing calls this directly
no test coverage detected