deletes the retrieved element, do not use for non integral types
| 158 | |
| 159 | // deletes the retrieved element, do not use for non integral types |
| 160 | bool pop(T &v) { |
| 161 | std::unique_lock<std::mutex> lock(this->mutex); |
| 162 | if (this->q.empty()) |
| 163 | return false; |
| 164 | v = this->q.front(); |
| 165 | this->q.pop(); |
| 166 | return true; |
| 167 | } |
| 168 | |
| 169 | bool empty() const { |
| 170 | auto thiz = const_cast<ThreadSafeQueue *>(this); |
no test coverage detected