summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qcollator_win.cpp
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2017-02-11 09:37:32 +0100
committerMarc Mutz <marc.mutz@kdab.com>2017-02-13 08:42:41 +0000
commita85b4d79db5c11f5a309fbbc52e80a81096c0f01 (patch)
tree62946a9a01467a3d971f5d7dba008ef6809b54df /src/corelib/tools/qcollator_win.cpp
parent7efd024b929c7815f48eb10fb9bc70c77b1a72ad (diff)
QThreadPool: replace a QSet with a QList
QThreadPool maintains three containers of QThreadPoolThread*: - allThreads, a QSet - waitingThreads, a QQueue - expiredThreads, also a QQueue None of the operations on allThreads make use of QSets fast lookup. The only functions called on it are isEmpty(), count(), insert(), and swap(). Since therefore QSet adds nothing but overhead, causes indeterminism (e.g. when deleting threads in Private::reset()) and code bloat, use the same container for allThreads that underlies QQueue: QList. Port insert() to append(). Add an assert to verify that we're not running into an ABA problem here (but this should never fire, since we're never deleting threads except in Private::reset(), where we do remove them from allThreads), just in case. Saves ~0.5KiB in text size on optimized Linux AMD64 GCC 7.0 builds. Change-Id: I53a4d5ef2c204420f7c8852f1e72ab3d6ea43d08 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/tools/qcollator_win.cpp')
0 files changed, 0 insertions, 0 deletions