diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2023-01-12 16:00:14 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2023-01-12 16:00:14 +0000 |
commit | cc22e64d4c23ae04174e151c579d0c21376eb9e4 (patch) | |
tree | 9fc67e355097c843d2623f0598d28e3cef4ce9b8 /storage | |
parent | 95454080298e628920f310ccaaa9fd1487824d7f (diff) |
Notify only one, and hold the lock if you did not get anything to dispatch.
Diffstat (limited to 'storage')
-rw-r--r-- | storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp b/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp index 5886172b9cd..402beef0f11 100644 --- a/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp +++ b/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp @@ -1116,10 +1116,7 @@ FileStorHandlerImpl::Stripe::schedule_and_get_next_async_message(MessageEntry en update_cached_queue_size(guard); auto lockedMessage = get_next_async_message(guard); if ( ! lockedMessage.msg) { - if (guard.owns_lock()) { - guard.unlock(); - } - _cond->notify_all(); + _cond->notify_one(); } return lockedMessage; } |