diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2022-12-21 17:40:52 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2022-12-21 17:40:52 +0000 |
commit | 10ab73fe668d7d39d0cde8ce684f1603160aec15 (patch) | |
tree | 4b301d662fb720387cb9dd319f453439839e9b64 | |
parent | a736bb0912f680bbb39396934ca9bbd0b921fde8 (diff) |
Add explicit wakeup between stop and join.
-rw-r--r-- | vespalib/src/vespa/vespalib/util/singleexecutor.cpp | 4 |
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 |