diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-07-30 09:34:51 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-07-30 11:33:31 +0200 |
commit | 8618707dd9d7de2a439ab361d7ff6bca373670c4 (patch) | |
tree | 5643391c53c14273e0d309c238e36b72507a31f8 /comphelper | |
parent | bb2470ffb749ed95e77cc112ee08a46c8b99be36 (diff) |
tsan:data race in ThreadPoolTest::testWorkerUsage
Change-Id: Id63b9f1dd7ed163236837258e8dbad2feb9f1c5e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119695
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'comphelper')
-rw-r--r-- | comphelper/qa/unit/threadpooltest.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/comphelper/qa/unit/threadpooltest.cxx b/comphelper/qa/unit/threadpooltest.cxx index 890fdfe93f22..14da59988ef4 100644 --- a/comphelper/qa/unit/threadpooltest.cxx +++ b/comphelper/qa/unit/threadpooltest.cxx @@ -16,6 +16,7 @@ #include <osl/thread.hxx> #include <stdlib.h> +#include <atomic> #include <thread> #include <mutex> @@ -74,7 +75,7 @@ public: mutex.lock(); mutex.unlock(); } - static inline int count = 0; + static inline std::atomic<int> count = 0; static inline std::mutex mutex; }; } // namespace |