From: Matthias Maier Date: Fri, 12 Jun 2020 21:26:48 +0000 (-0500) Subject: switch to std::atomic instead of using std::atomic_bool X-Git-Tag: v9.3.0-rc1~1436^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=739f67053827592ea73312a4101bb846fece8069;p=dealii.git switch to std::atomic instead of using std::atomic_bool --- diff --git a/include/deal.II/base/thread_management.h b/include/deal.II/base/thread_management.h index 2d25c1d9ff..f4bc2ac51d 100644 --- a/include/deal.II/base/thread_management.h +++ b/include/deal.II/base/thread_management.h @@ -460,11 +460,11 @@ namespace Threads * more. Consequently, we can in fact join from different threads and * we test this in base/thread_validity_07. * - * @note The reason why we need to use an std::atomic_bool is + * @note The reason why we need to use a std::atomic is * discussed in detail in the documentation of * Task::task_has_finished. */ - std::atomic_bool thread_is_active; + std::atomic thread_is_active; /** * Mutex guarding access to the previous variable. @@ -1276,7 +1276,7 @@ namespace Threads * [3] * https://preshing.com/20130930/double-checked-locking-is-fixed-in-cpp11/ */ - std::atomic_bool task_has_finished; + std::atomic task_has_finished; /** * The place where the returned value is moved to once the std::future