From: Wolfgang Bangerth Date: Fri, 5 Oct 2018 23:08:34 +0000 (-0600) Subject: Deprecate Threads::n_existing_threads() and Threads::this_thread_id(). X-Git-Tag: v9.1.0-rc1~653^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cb1276ca8abbb847bb26c8aaf1b7f77b5ae62682;p=dealii.git Deprecate Threads::n_existing_threads() and Threads::this_thread_id(). --- diff --git a/include/deal.II/base/thread_management.h b/include/deal.II/base/thread_management.h index f07c62e24e..b0b0566922 100644 --- a/include/deal.II/base/thread_management.h +++ b/include/deal.II/base/thread_management.h @@ -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 * gettid, 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();