summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2022-12-21 17:40:52 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2022-12-21 17:40:52 +0000
commit10ab73fe668d7d39d0cde8ce684f1603160aec15 (patch)
tree4b301d662fb720387cb9dd319f453439839e9b64
parenta736bb0912f680bbb39396934ca9bbd0b921fde8 (diff)
Add explicit wakeup between stop and join.
-rw-r--r--vespalib/src/vespa/vespalib/util/singleexecutor.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/vespalib/src/vespa/vespalib/util/singleexecutor.cpp b/vespalib/src/vespa/vespalib/util/singleexecutor.cpp
index 21ed90c3d22..c2f83bbcf09 100644
--- a/vespalib/src/vespa/vespalib/util/singleexecutor.cpp
+++ b/vespalib/src/vespa/vespalib/util/singleexecutor.cpp
@@ -43,7 +43,9 @@ SingleExecutor::SingleExecutor(init_fun_t func, uint32_t reservedQueueSize, bool
SingleExecutor::~SingleExecutor() {
shutdown();
sync();
- _thread.stop().join();
+ _thread.stop();
+ _consumerCondition.notify_one();
+ _thread.join();
}
size_t