| 17 | threadsafe_queue() {} |
| 18 | |
| 19 | void push(T new_value) { |
| 20 | std::lock_guard<std::mutex> lk(mut); |
| 21 | data_queue.push(std::move(new_value)); |
| 22 | data_cond.notify_all(); |
| 23 | } |
| 24 | |
| 25 | void wait_and_pop(T& value) { |
| 26 | std::unique_lock<std::mutex> lk(mut); |
no outgoing calls
no test coverage detected