Pops the last item from the queue, or returns a nullopt if empty
| 41 | |
| 42 | // Pops the last item from the queue, or returns a nullopt if empty |
| 43 | std::optional<T> TryPop() { |
| 44 | std::unique_lock<std::mutex> lock(mutex_); |
| 45 | return TryPopUnlocked(); |
| 46 | } |
| 47 | |
| 48 | // Pushes an item to the queue |
| 49 | void Push(const T& item) { |
no outgoing calls