summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2009-08-20 13:49:34 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2009-08-20 14:03:38 (GMT)
commit354a08b44bcd90cdce22698e204f7306ceea9385 (patch)
tree5fb8979bbe54e65a83dba8c8e151a4e20720cd55
parent076a2a027b986684cd0c1a08e37256655409b41e (diff)
downloadQt-354a08b44bcd90cdce22698e204f7306ceea9385.zip
Qt-354a08b44bcd90cdce22698e204f7306ceea9385.tar.gz
Qt-354a08b44bcd90cdce22698e204f7306ceea9385.tar.bz2
This variable is used to signal a thread to exit. It should be volatile.
It's a long stretch, but it could happen that the compiler optimises out the checking of the variable because it could not change synchronously. In any case, it's best to set it to volatile to ensure that all architectures reload properly (memory ordering semantics) Reviewed-by: Alexis Menard
-rw-r--r--src/gui/dialogs/qfileinfogatherer_p.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/dialogs/qfileinfogatherer_p.h b/src/gui/dialogs/qfileinfogatherer_p.h
index cb980d2..bab4a29 100644
--- a/src/gui/dialogs/qfileinfogatherer_p.h
+++ b/src/gui/dialogs/qfileinfogatherer_p.h
@@ -184,7 +184,7 @@ private:
QMutex mutex;
QWaitCondition condition;
- bool abort;
+ volatile bool abort;
QStack<QString> path;
QStack<QStringList> files;