diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2020-06-14 17:36:17 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-14 17:36:17 +0200 |
commit | 0e4a1ad6ed04f8b51e6c79b4b82b597bcdc38b0c (patch) | |
tree | ede34221ac36f440de4fb0ba600bfab1a8f9be19 /vespalib | |
parent | aacb857c63b9932ecac330d65bdd28d05d458b62 (diff) | |
parent | bfc6cfee7ea0dc4b8746573ab6e18fc5941c59c2 (diff) |
Merge pull request #13580 from vespa-engine/havardpe/fix-compile-cache-deadlock-with-blocking-executor
avoid deadlock when using compile cache with blocking executors
Diffstat (limited to 'vespalib')
-rw-r--r-- | vespalib/src/vespa/vespalib/util/threadstackexecutorbase.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/vespalib/src/vespa/vespalib/util/threadstackexecutorbase.cpp b/vespalib/src/vespa/vespalib/util/threadstackexecutorbase.cpp index efb1dbf4054..ad5d78d5ab6 100644 --- a/vespalib/src/vespa/vespalib/util/threadstackexecutorbase.cpp +++ b/vespalib/src/vespa/vespalib/util/threadstackexecutorbase.cpp @@ -87,6 +87,7 @@ ThreadStackExecutorBase::obtainTask(Worker &worker) if (!worker.idle) { assert(_taskCount != 0); --_taskCount; + wakeup(monitor); _barrier.completeEvent(worker.task.token); worker.idle = true; } @@ -96,7 +97,6 @@ ThreadStackExecutorBase::obtainTask(Worker &worker) worker.task = std::move(_tasks.front()); worker.idle = false; _tasks.pop(); - wakeup(monitor); return true; } if (_closed) { |