]> https://gitweb.dealii.org/ - dealii.git/commit
Exit the given subsection in TimerOutput::Scope. 5087/head
authorDavid Wells <wellsd2@rpi.edu>
Thu, 14 Sep 2017 18:24:29 +0000 (14:24 -0400)
committerDavid Wells <wellsd2@rpi.edu>
Thu, 14 Sep 2017 18:35:49 +0000 (14:35 -0400)
commiteb6d92aec34ca779317d119f41c08319298d99ca
tree93f16a44e142de304c548ace7e016b7ee1469375
parente4e4b9e37f7f2ab1da8c8d7528ec4d81b292f538
Exit the given subsection in TimerOutput::Scope.

The current implementation doesn't work in a multithreaded context.
Consider the following sequence of events:

Thread 1: start and create Scope scope_1(timer_output, "1")
Thread 2: start and create Scope scope_2(timer_output, "2")
Thread 1: call ~scope_1() and join
Thread 2: call ~scope_2() and join

The current implementation of ~Scope() exits the most recent subsection,
so when ~scope_1() is called we leave subsection "2" and when ~scope_2()
is called we leave subsection "1". We can get around this by always
explicitly exiting the subsection in which we started.
doc/news/changes/minor/20170914DavidWells [new file with mode: 0644]
include/deal.II/base/timer.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.