Do not access internal allThreads data unlocked
Pick-to: 6.1 6.0 5.15 Change-Id: I54eb67571fff07ffdbf9d2b77c96bb85e3fae5e0 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
f4e23bf3de
commit
ffb5635c1a
@ -788,6 +788,7 @@ bool QThreadPool::contains(const QThread *thread) const
|
||||
const QThreadPoolThread *poolThread = qobject_cast<const QThreadPoolThread *>(thread);
|
||||
if (!poolThread)
|
||||
return false;
|
||||
QMutexLocker locker(&d->mutex);
|
||||
return d->allThreads.contains(const_cast<QThreadPoolThread *>(poolThread));
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user