]> https://gitweb.dealii.org/ - dealii.git/commit
Add a mutex to IndexSet and use it to make IndexSet::do_compress() thread-safe. 3687/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Tue, 20 Dec 2016 16:00:01 +0000 (09:00 -0700)
committerWolfgang Bangerth <bangerth@colostate.edu>
Tue, 20 Dec 2016 16:00:01 +0000 (09:00 -0700)
commit92832c355c45de79ffd56aa70f3108c98745abc3
treebfbc32f4ab38cf952ec41e53289c5fd8298770a5
parentb3ed046d8b200d4dc4df0ba4a250007e8cfe26ab
Add a mutex to IndexSet and use it to make IndexSet::do_compress() thread-safe.

IndexSet has a number of 'mutable' member variables. The only function that modifies them is
'do_compress', which is called by 'compress', which is in turn called by all of the
'const' member functions. To make all of these 'const' member functions thread-safe, we
need to use a mutex in 'do_compress'. This patch does this.

I have verified that no other 'const' function actually modifies any of the 'mutable'
member variables, so only guarding 'do_compress' by the mutex is sufficient.
doc/news/changes/minor/20161220Bangerth [new file with mode: 0644]
include/deal.II/base/index_set.h
source/base/index_set.cc

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.