| 35 | } |
| 36 | |
| 37 | T Pop() { |
| 38 | std::unique_lock<std::mutex> lock(_block_mutex); |
| 39 | _empty_notify.wait(_block_mutex, [this]() {return !this->_block_queue.empty(); }); |
| 40 | T ret = std::move(_block_queue.back()); |
| 41 | _block_queue.pop_back(); |
| 42 | _full_notify.notify_all(); |
| 43 | return std::move(ret); |
| 44 | } |
| 45 | |
| 46 | void Clear(bool notify = true) { |
| 47 | std::unique_lock<std::mutex> lock(_block_mutex); |
nothing calls this directly
no outgoing calls
no test coverage detected