| 962 | // Never allocates. Thread-safe. |
| 963 | template<typename U> |
| 964 | bool try_dequeue_non_interleaved(U& item) |
| 965 | { |
| 966 | for (auto ptr = producerListTail.load(std::memory_order_acquire); ptr != nullptr; ptr = ptr->next_prod()) { |
| 967 | if (ptr->dequeue(item)) { |
| 968 | return true; |
| 969 | } |
| 970 | } |
| 971 | return false; |
| 972 | } |
| 973 | |
| 974 | // Attempts to dequeue from the queue using an explicit consumer token. |
| 975 | // Returns false if all producer streams appeared empty at the time they |