]> https://gitweb.dealii.org/ - dealii.git/commit
Thread/Task: Fix Schmidt's double checking
authorMatthias Maier <tamiko@43-1.org>
Fri, 12 Jun 2020 20:53:31 +0000 (15:53 -0500)
committerMatthias Maier <tamiko@43-1.org>
Fri, 12 Jun 2020 20:57:30 +0000 (15:57 -0500)
commitcae065f0165ccf9f5fd6d5f373b16d74e9260c38
tree5c70bd54947f2bd926035a95fc70772c01326f6c
parent5fc5452285efbc2e879e7ec943bce0c65d928b37
Thread/Task: Fix Schmidt's double checking

We have to use a std::atomic_bool instead of a bool to ensure proper
memory fencing, see [1] for an in-detail discussion.

[1] https://preshing.com/20130930/double-checked-locking-is-fixed-in-cpp11/
include/deal.II/base/thread_management.h

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.