Merge lp:~fboucault/unity8/window_state_storage_max_thread_fix into lp:unity8

Proposed by Florian Boucault
Status: Merged
Approved by: Lukáš Tinkl
Approved revision: 2869
Merged at revision: 2899
Proposed branch: lp:~fboucault/unity8/window_state_storage_max_thread_fix
Merge into: lp:unity8
Diff against target: 30 lines (+3/-1)
2 files modified
plugins/Utils/windowstatestorage.cpp (+1/-1)
plugins/Utils/windowstatestorage.h (+2/-0)
To merge this branch: bzr merge lp:~fboucault/unity8/window_state_storage_max_thread_fix
Reviewer Review Type Date Requested Status
Lukáš Tinkl (community) Approve
Unity8 CI Bot continuous-integration Approve
Review via email: mp+320813@code.launchpad.net

Commit message

WindowStateStorage: use a private QThreadPool to ensure that WindowStateStorage::saveValue always has a thread available to execute the query in.

Description of the change

WindowStateStorage: use a private QThreadPool to ensure that WindowStateStorage::saveValue always has a thread available to execute the query in.

To post a comment you must log in.
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

PASSED: Continuous integration, rev:2869
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/3516/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/4650
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/2809
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=zesty,testname=qmluitests.sh/2809
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/4678
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/4503
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/4503/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/4503
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/4503/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/4503
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/4503/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/4503
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/4503/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/4503
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/4503/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/4503
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/4503/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/3516/rebuild

review: Approve (continuous-integration)
Revision history for this message
Lukáš Tinkl (lukas-kde) wrote :

* Did you perform an exploratory manual test run of the code change and any related functionality?

yes

* Did CI run pass? If not, please explain why.

yes

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/Utils/windowstatestorage.cpp'
2--- plugins/Utils/windowstatestorage.cpp 2017-01-03 16:56:39 +0000
3+++ plugins/Utils/windowstatestorage.cpp 2017-03-23 14:23:28 +0000
4@@ -165,7 +165,7 @@
5 {
6 QMutexLocker mutexLocker(&s_mutex);
7
8- QFuture<void> future = QtConcurrent::run(executeAsyncQuery, queryString);
9+ QFuture<void> future = QtConcurrent::run(&m_threadPool, executeAsyncQuery, queryString);
10 m_asyncQueries.append(future);
11
12 QFutureWatcher<void> *futureWatcher = new QFutureWatcher<void>();
13
14=== modified file 'plugins/Utils/windowstatestorage.h'
15--- plugins/Utils/windowstatestorage.h 2017-01-16 10:49:11 +0000
16+++ plugins/Utils/windowstatestorage.h 2017-03-23 14:23:28 +0000
17@@ -18,6 +18,7 @@
18 #include <QSqlDatabase>
19 #include <QMutex>
20 #include <QFuture>
21+#include <QThreadPool>
22
23 // unity-api
24 #include <unity/shell/application/Mir.h>
25@@ -72,4 +73,5 @@
26 QSqlDatabase m_db;
27
28 QList<QFuture<void>> m_asyncQueries;
29+ QThreadPool m_threadPool;
30 };

Subscribers

People subscribed via source and target branches