void swap(queue_type &q) { m_mutex.lock(); q.swap(m_queue); if (m_queue.empty() && sleeping_on_empty) { m_empty_conditional.signal(); } m_mutex.unlock(); }
void swap(queue_type &q) { m_mutex.lock(); q.swap(m_queue); m_mutex.unlock(); }