| 296 | // Never allocates. Thread-safe. |
| 297 | template<typename U> |
| 298 | inline bool try_dequeue(U& item) |
| 299 | { |
| 300 | if (sema->tryWait()) { |
| 301 | while (!inner.try_dequeue(item)) { |
| 302 | continue; |
| 303 | } |
| 304 | return true; |
| 305 | } |
| 306 | return false; |
| 307 | } |
| 308 | |
| 309 | // Attempts to dequeue from the queue using an explicit consumer token. |
| 310 | // Returns false if all producer streams appeared empty at the time they |
no test coverage detected