]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Ensure that a thread can indeed be joined. This doesn't always appear
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 1 Jul 2011 19:05:54 +0000 (19:05 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 1 Jul 2011 19:05:54 +0000 (19:05 +0000)
to be the case, and a friendly assertion is better than a hard
exception that is thrown from the OS and doesn't contain much information.

git-svn-id: https://svn.dealii.org/trunk@23912 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/include/deal.II/base/thread_management.h

index 4fe93b8e6f55dce221a26c9b9cae241b18dcf11f..2b8fc82093c228eb190072777306640c73df9820 100644 (file)
@@ -1339,6 +1339,7 @@ namespace Threads
                                          */
        void join ()
          {
+           Assert (thread.joinable(), ExcInternalError());
            thread.join ();
          }
 

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.