When you add a message to the Q you will at most provide work for 1 persistence thread.
@@ -1100,13 +1100,11 @@ FileStorHandlerImpl::Stripe::abort(std::vector<std::shared_ptr<api::StorageReply
bool
FileStorHandlerImpl::Stripe::schedule(MessageEntry messageEntry)
-{
{
std::lock_guard guard(*_lock);
_queue->emplace_back(std::move(messageEntry));
update_cached_queue_size(guard);
- }
- _cond->notify_all();
+ _cond->notify_one();
return true;
}
