diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2015-12-26 03:33:04 +0100 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2016-01-04 12:22:50 +0000 |
commit | 5170c0416bc598414d026f35774c617173ce6ece (patch) | |
tree | 7b255f7aeccce18256518bf19cd06aaf4d92f691 /src/corelib/io/io.pri | |
parent | 90484f3901c5fe63a056001eebf9ea62cac0cf58 (diff) |
QWindowsFileSystemWatcher: increase concurrency when canceling threads
The old code asked each thread to stop, and then waited for
that one thread to finish before deleting it and turning
to the next thread in line.
Split the three actions, ie. first ask all threads to stop,
then wait for all threads to finish, and only then delete
all of them.
Apart from being more icache-friendly, this enables more
concurrency, as stopped threads' cleanup work can overlap
with other's, thus reducing the wait() time per thread to
potentially zero.
Did not replicate the inefficient foreach loop, but went
with C++11 range-fors directly.
Change-Id: I53e598e31999a772c0f81ff5885490216e13d492
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'src/corelib/io/io.pri')
0 files changed, 0 insertions, 0 deletions