added tp->wait_empty()

This commit is contained in:
gabime
2018-05-27 02:53:16 +03:00
parent 0d0a841e8d
commit 8338b45b2b
4 changed files with 51 additions and 16 deletions

View File

@@ -139,6 +139,11 @@ public:
return msg_counter_.load(std::memory_order_relaxed);
}
void wait_empty()
{
q_.wait_empty();
}
private:
std::atomic<size_t> msg_counter_; // total # of messages processed in this pool
q_type q_;