diff options
| author | Marc Mutz <marc.mutz@qt.io> | 2022-12-22 11:58:17 +0100 |
|---|---|---|
| committer | Marc Mutz <marc.mutz@qt.io> | 2022-12-23 23:22:57 +0100 |
| commit | c0496013484c35ab9b1a29ffb0f1eb687ef6db78 (patch) | |
| tree | c945bdef1d32a96edbaca236f6f47ece07aab6c4 /src/sql/kernel/qsqldatabase.cpp | |
| parent | 26ea6157e6429a6ba0794272df195c0bc591cda9 (diff) | |
runOnAndroidMainThread(): Don't block QThreadPool::globalInstance() with timout awaiters
A waiting task on QThreadPool::globalInstance() will block the worker
thread that it was scheduled on, making it unavailable for productive
work. That's why one should only put CPU-bound tasks onto
QThreadPool::globalInstance(). When blocking nonetheless, use the
releaseThread()/reserveThread() trick to avoid deadlocks caused by the
pool running out of workers.
So, do that here.
Task-number: QTBUG-109586
Pick-to: 6.5 6.4 6.2
Change-Id: Ia2660c69e1f23b5df0c308576301aac6e05d4725
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Diffstat (limited to 'src/sql/kernel/qsqldatabase.cpp')
0 files changed, 0 insertions, 0 deletions
