* Push an element into the queue. Blocking operation. * @return true if success; */
| 43 | * @return true if success; |
| 44 | */ |
| 45 | bool Push(const T& e) { |
| 46 | std::lock_guard<std::mutex> lock(mutex_); |
| 47 | queue_.push(e); |
| 48 | condition_.notify_one(); |
| 49 | return true; |
| 50 | } |
| 51 | |
| 52 | /** |
| 53 | * Pop an element from the queue. |
no test coverage detected