| 1166 | // Never allocates. Thread-safe. |
| 1167 | template<typename U> |
| 1168 | bool try_dequeue_non_interleaved(U& item) |
| 1169 | { |
| 1170 | for (auto ptr = producerListTail.load(std::memory_order_acquire); ptr != nullptr; ptr = ptr->next_prod()) { |
| 1171 | if (ptr->dequeue(item)) { |
| 1172 | return true; |
| 1173 | } |
| 1174 | } |
| 1175 | return false; |
| 1176 | } |
| 1177 | |
| 1178 | // Attempts to dequeue from the queue using an explicit consumer token. |
| 1179 | // Returns false if all producer streams appeared empty at the time they |