summaryrefslogtreecommitdiffstats
path: root/src/widgets/doc/snippets/styles/qcustompixmapstyle.cpp
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2022-04-30 10:21:26 +0200
committerMarc Mutz <marc.mutz@qt.io>2022-04-30 23:54:38 +0200
commitc847f0091d484de7b3fb1049838eee3f2ac3dfc5 (patch)
treed3837330a68e4e17bbb974c3219deda61308dcb0 /src/widgets/doc/snippets/styles/qcustompixmapstyle.cpp
parent1808df9ce59a8c1d426f0361e25120a7852a6442 (diff)
QFutureInterface: use (new) qYieldCpu() instead of _mm_pause()
This loop here was a lonesome instance of a CAS loop in which adding _mm_pause() was simple, because the code didn't use the usual pattern do { construct new value } while (!testAndSet) we use everywhere else in Qt. In search of an elegant pattern that would allow to apply qYieldCpu()/_mm_pause() to those idiomatic CAS loops, too, I've reached for a lambda to construct the new value. This should apply to all (tight) CAS loops, and may form the basis of an API extension whereby we take that lambda as a function argument to encapsulate the CAS loop in an algorithm (a function). Pick-to: 6.3 Change-Id: Id4a8f174dd812aa26f0b163e943bd4558e5e6a7b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'src/widgets/doc/snippets/styles/qcustompixmapstyle.cpp')
0 files changed, 0 insertions, 0 deletions