aboutsummaryrefslogtreecommitdiffstats
path: root/staging_vespalib/src/vespa/vespalib/util/singleexecutor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'staging_vespalib/src/vespa/vespalib/util/singleexecutor.cpp')
-rw-r--r--staging_vespalib/src/vespa/vespalib/util/singleexecutor.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/staging_vespalib/src/vespa/vespalib/util/singleexecutor.cpp b/staging_vespalib/src/vespa/vespalib/util/singleexecutor.cpp
index b25bc1a6377..a2962c6ea84 100644
--- a/staging_vespalib/src/vespa/vespalib/util/singleexecutor.cpp
+++ b/staging_vespalib/src/vespa/vespalib/util/singleexecutor.cpp
@@ -89,7 +89,9 @@ SingleExecutor::drain(Lock & lock) {
void
SingleExecutor::wakeup() {
- _consumerCondition.notify_one();
+ if (numTasks() > 0) {
+ _consumerCondition.notify_one();
+ }
}
SingleExecutor &