| 759 | // Never allocates. Thread-safe. |
| 760 | template<typename U> |
| 761 | inline void wait_dequeue(U& item) |
| 762 | { |
| 763 | sema->wait(); |
| 764 | while (!inner.try_dequeue(item)) { |
| 765 | continue; |
| 766 | } |
| 767 | } |
| 768 | |
| 769 | // Blocks the current thread until either there's something to dequeue |
| 770 | // or the timeout (specified in microseconds) expires. Returns false |