| 1188 | // Never allocates. Thread-safe. |
| 1189 | template<typename U> |
| 1190 | bool try_dequeue_non_interleaved(U& item) |
| 1191 | { |
| 1192 | for (auto ptr = producerListTail.load(std::memory_order_acquire); ptr != nullptr; ptr = ptr->next_prod()) { |
| 1193 | if (ptr->dequeue(item)) { |
| 1194 | return true; |
| 1195 | } |
| 1196 | } |
| 1197 | return false; |
| 1198 | } |
| 1199 | |
| 1200 | // Attempts to dequeue from the queue using an explicit consumer token. |
| 1201 | // Returns false if all producer streams appeared empty at the time they |