| 167 | } |
| 168 | |
| 169 | bool empty() const { |
| 170 | auto thiz = const_cast<ThreadSafeQueue *>(this); |
| 171 | std::unique_lock<std::mutex> lock(thiz->mutex); |
| 172 | return this->q.empty(); |
| 173 | } |
| 174 | |
| 175 | size_t size() const { |
| 176 | auto thiz = const_cast<ThreadSafeQueue *>(this); |
no outgoing calls