From 354a08b44bcd90cdce22698e204f7306ceea9385 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 20 Aug 2009 15:49:34 +0200 Subject: 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 --- src/gui/dialogs/qfileinfogatherer_p.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 path; QStack files; -- cgit v0.12