| 694 | // Never allocates. Thread-safe. |
| 695 | template<typename U> |
| 696 | inline bool try_dequeue(U& item) |
| 697 | { |
| 698 | if (sema->tryWait()) { |
| 699 | while (!inner.try_dequeue(item)) { |
| 700 | continue; |
| 701 | } |
| 702 | return true; |
| 703 | } |
| 704 | return false; |
| 705 | } |
| 706 | |
| 707 | // Attempts to dequeue from the queue using an explicit consumer token. |
| 708 | // Returns false if all producer streams appeared empty at the time they |
no test coverage detected