os/bluestore/BlueStore: optimize WALWQ::flush()

In fact ThreadPool::drain will do
a)wait WorkQueue::empty() is true
b)wait processing thread to complete.
So it can remove the same work which wait WorkQueue::empty().

Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
This commit is contained in:
Jianpeng Ma 2016-05-23 20:17:53 +08:00
parent 0ee99d609e
commit 4e1294030e

View File

@ -749,11 +749,6 @@ public:
}
void flush() {
lock();
while (!wal_queue.empty()) {
_wait();
}
unlock();
drain();
}
};