]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Deprecate Threads::n_existing_threads() and Threads::this_thread_id().
authorWolfgang Bangerth <bangerth@colostate.edu>
Fri, 5 Oct 2018 23:08:34 +0000 (17:08 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Fri, 5 Oct 2018 23:08:34 +0000 (17:08 -0600)
include/deal.II/base/thread_management.h

index f07c62e24e0ef3db7ea8fc99a8dbb4c6ae16de0e..b0b056692256a6ea4ea15a36cd3fd56ca81672e7 100644 (file)
@@ -311,8 +311,18 @@ namespace Threads
    * may have created to work on tasks created using the Threads::new_task
    * functions are not counted.
    *
+   * @deprecated This function is a left-over from a time when deal.II was
+   *   in charge of creating all threads itself. But this is no longer the
+   *   case: Both deal.II itself and applications can create threads via
+   *   C++11 functions, and deal.II also relies on libraries such as the
+   *   Threading Building Blocks that can create threads when executing
+   *   certain functionality. As a consequence, we can no longer compute
+   *   an accurate number of threads currently operating, and whatever
+   *   this function returns is not accurate.
+   *
    * @ingroup threads
    */
+  DEAL_II_DEPRECATED
   unsigned int
   n_existing_threads();
 
@@ -325,8 +335,11 @@ namespace Threads
    * @todo As of now, none of our systems seems to support
    * <code>gettid</code>, so that part of the code is untested yet.
    *
+   * @deprecated Use std::thread::get_id() or std::this_thread::get_id() instead.
+   *
    * @ingroup threads
    */
+  DEAL_II_DEPRECATED
   unsigned int
   this_thread_id();
 

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.