]> https://gitweb.dealii.org/ - dealii.git/commitdiff
switch to std::atomic<bool> instead of using std::atomic_bool 10523/head
authorMatthias Maier <tamiko@43-1.org>
Fri, 12 Jun 2020 21:26:48 +0000 (16:26 -0500)
committerMatthias Maier <tamiko@43-1.org>
Fri, 12 Jun 2020 21:26:48 +0000 (16:26 -0500)
include/deal.II/base/thread_management.h

index 2d25c1d9ff94cb149aeb754f8df3c9eca184cfa6..f4bc2ac51d9078519e4d285300c5ead086220e99 100644 (file)
@@ -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<bool> is
        * discussed in detail in the documentation of
        * Task::task_has_finished.
        */
-      std::atomic_bool thread_is_active;
+      std::atomic<bool> 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<bool> task_has_finished;
 
       /**
        * The place where the returned value is moved to once the std::future

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.