diff options
author | Sebastian Holtermann <sebholt@xwmw.org> | 2019-04-21 09:14:11 (GMT) |
---|---|---|
committer | Sebastian Holtermann <sebholt@xwmw.org> | 2019-04-24 10:32:58 (GMT) |
commit | 9794b72d38d4aadef352d3ae80d7dee2fbfcb7fb (patch) | |
tree | 4c6a60839c7b651038efdfbfd6bf889f69a60c8f /Source/cmQtAutoMocUic.cxx | |
parent | 993dfa89d8f49e06d44e86c97502a5d7630f3dcf (diff) | |
download | CMake-9794b72d38d4aadef352d3ae80d7dee2fbfcb7fb.zip CMake-9794b72d38d4aadef352d3ae80d7dee2fbfcb7fb.tar.gz CMake-9794b72d38d4aadef352d3ae80d7dee2fbfcb7fb.tar.bz2 |
cmWorkerPool: Set worker thread count separately to Process()
Don't pass the desired worker thread count to the `cmWorkerPool::Process()`
method but set it separately with the new `cmWorkerPool::SetThreadCount`
method. This allows calling `cmWorkerPool::Process()` repeatedly without
having to pass the thread count every time.
Diffstat (limited to 'Source/cmQtAutoMocUic.cxx')
-rw-r--r-- | Source/cmQtAutoMocUic.cxx | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Source/cmQtAutoMocUic.cxx b/Source/cmQtAutoMocUic.cxx index 75c5d8a..005c27d 100644 --- a/Source/cmQtAutoMocUic.cxx +++ b/Source/cmQtAutoMocUic.cxx @@ -1186,6 +1186,7 @@ bool cmQtAutoMocUic::Init(cmMakefile* makefile) num = std::min<unsigned long>(num, ParallelMax); Base_.NumThreads = static_cast<unsigned int>(num); } + WorkerPool_.SetThreadCount(Base_.NumThreads); } // - Files and directories @@ -1482,15 +1483,12 @@ bool cmQtAutoMocUic::Process() if (!CreateDirectories()) { return false; } - - if (!WorkerPool_.Process(Base().NumThreads, this)) { + if (!WorkerPool_.Process(this)) { return false; } - if (JobError_) { return false; } - return SettingsFileWrite(); } |