diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2017-04-21 16:15:58 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-21 16:15:58 +0200 |
commit | 8783a8eb35c547bf9700965863c98edc73d3c047 (patch) | |
tree | 36907e2e99379b6a7b28918a7daa8f21e70a1e1e /searchcore/src | |
parent | a6026556863039e33fab8af9be68ff4405aeeda3 (diff) | |
parent | ac652de71eab6562a099cb4941a5010af5dd57a5 (diff) |
Merge pull request #2225 from yahoo/balder/also-sync-generic-executor-in-masterthread
generic executor must be synced independed of being invoked by master…
Diffstat (limited to 'searchcore/src')
-rw-r--r-- | searchcore/src/vespa/searchcore/proton/server/maintenancecontroller.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/server/maintenancecontroller.cpp b/searchcore/src/vespa/searchcore/proton/server/maintenancecontroller.cpp index 15e4d6aadad..7bec456d0f5 100644 --- a/searchcore/src/vespa/searchcore/proton/server/maintenancecontroller.cpp +++ b/searchcore/src/vespa/searchcore/proton/server/maintenancecontroller.cpp @@ -91,6 +91,8 @@ MaintenanceController::killJobs() for (auto &job : _jobs) { job->stop(); // Make sure no more tasks are added to the executor } + _defaultExecutor.sync(); + _defaultExecutor.sync(); if (_masterThread.isCurrentThread()) { JobList tmpJobs = _jobs; { @@ -105,8 +107,6 @@ MaintenanceController::killJobs() // task to the executor as it might not see the new value of the stopped flag. _masterThread.sync(); _masterThread.sync(); - _defaultExecutor.sync(); - _defaultExecutor.sync(); // Clear jobs in master write thread, to avoid races _masterThread.execute(makeTask(makeClosure(this, &MaintenanceController::performClearJobs))); _masterThread.sync(); |