| 304 | ceph_assert(m_processing == 0); |
| 305 | } |
| 306 | void drain() { |
| 307 | { |
| 308 | // if this queue is empty and not processing, don't wait for other |
| 309 | // queues to finish processing |
| 310 | std::lock_guard l(m_pool->_lock); |
| 311 | if (m_processing == 0 && m_items.empty()) { |
| 312 | return; |
| 313 | } |
| 314 | } |
| 315 | m_pool->drain(this); |
| 316 | } |
| 317 | void queue(T *item) { |
| 318 | std::lock_guard l(m_pool->_lock); |
| 319 | m_items.push_back(item); |