summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2021-06-25 14:06:26 +0200
committerStephan Bergmann <sbergman@redhat.com>2021-06-25 17:29:48 +0200
commit49cf5e5303d064a66e4ae97223df92238d556dd1 (patch)
tree01f78f8efbc24d22b4402959934d85f67c7ccb43 /vcl
parent5caba6ebf48e1ffe3f281055ae2aff5234bd594e (diff)
Fix misuse of volatile to avoid a data race
...introduced with 2601708e3c00092693af6dd04561125cafb21d8e "cleanup mutex and signalling in ExecuteWrapper" Change-Id: Iae1dda078d165355f82986f4105bd4bb53ce6e9a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117885 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/uitest/uno/uiobject_uno.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/vcl/source/uitest/uno/uiobject_uno.cxx b/vcl/source/uitest/uno/uiobject_uno.cxx
index ed208fd65d7d..14a50f08c7b7 100644
--- a/vcl/source/uitest/uno/uiobject_uno.cxx
+++ b/vcl/source/uitest/uno/uiobject_uno.cxx
@@ -7,6 +7,9 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
+#include <sal/config.h>
+
+#include <atomic>
#include <memory>
#include "uiobject_uno.hxx"
#include <utility>
@@ -56,7 +59,7 @@ class ExecuteWrapper
{
std::function<void()> mFunc;
Link<Timer*, void> mHandler;
- volatile bool mbSignal;
+ std::atomic<bool> mbSignal;
public: