summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHÃ¥vard Pettersen <3535158+havardpe@users.noreply.github.com>2022-12-21 22:48:40 +0100
committerGitHub <noreply@github.com>2022-12-21 22:48:40 +0100
commit93822f4da059d7507d852f186b6d5d9b1653920d (patch)
tree909588dd7dc220342229bbb60383a73ada8351e7
parent7475e193bd1aa21986e46e3f1e9a5442ed758c13 (diff)
parent10ab73fe668d7d39d0cde8ce684f1603160aec15 (diff)
Merge pull request #25326 from vespa-engine/balder/perform-wakeup-between-stop-and-join
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