summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2017-04-21 15:21:06 +0200
committerHenning Baldersheim <balder@yahoo-inc.com>2017-04-21 15:21:06 +0200
commitac652de71eab6562a099cb4941a5010af5dd57a5 (patch)
treec518c225a6d3d063c96aa599b47debd39c2497b2
parentd5da83f347399201391a639ed2600762018b6a83 (diff)
generic executor must be synced independed of being invoked by master thread or not.
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/maintenancecontroller.cpp4
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();