From: David Wells Date: Mon, 10 May 2021 18:12:00 +0000 (-0400) Subject: Deprecate Thread and ThreadGroup. X-Git-Tag: v9.3.0-rc1~99^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=912fd9ca37140557ae4b1f01ca8a7114dda5fe19;p=dealii.git Deprecate Thread and ThreadGroup. We should be using higher-level threading constructs, and these aren't used anywhere right now anyway. --- diff --git a/examples/step-13/step-13.cc b/examples/step-13/step-13.cc index 3a5f8bfae6..fd3f204a85 100644 --- a/examples/step-13/step-13.cc +++ b/examples/step-13/step-13.cc @@ -913,10 +913,10 @@ namespace Step13 // independent, we do that in parallel (if the library was configured to // use concurrency, at least; otherwise, the actions are performed // sequentially). Note that we start only one thread, and do the second - // action in the main thread. Since only one thread is generated, we don't - // use the Threads::ThreadGroup class here, but rather use - // the one created thread object directly to wait for this particular - // thread's exit. + // action in the main thread. Since only one task is generated, we don't + // use the Threads::TaskGroup class here, but rather use + // the one created task object directly to wait for this particular + // task's exit. // // Note that taking up the address of the // DoFTools::make_hanging_node_constraints function is a diff --git a/examples/step-14/step-14.cc b/examples/step-14/step-14.cc index dca1465222..f53d7a37b6 100644 --- a/examples/step-14/step-14.cc +++ b/examples/step-14/step-14.cc @@ -617,9 +617,9 @@ namespace Step14 // at least; otherwise, the actions are performed // sequentially). Note that we start only one thread, and do the // second action in the main thread. Since only one thread is - // generated, we don't use the Threads::ThreadGroup - // class here, but rather use the one created thread object - // directly to wait for this particular thread's exit. The + // generated, we don't use the Threads::TaskGroup + // class here, but rather use the one created task object + // directly to wait for this particular task's exit. The // approach is generally the same as the one we have used in // Solver::assemble_linear_system() above. // diff --git a/include/deal.II/base/thread_management.h b/include/deal.II/base/thread_management.h index f4bc2ac51d..f6a73197ae 100644 --- a/include/deal.II/base/thread_management.h +++ b/include/deal.II/base/thread_management.h @@ -569,7 +569,12 @@ namespace Threads * omit the template argument. * * @ingroup threads - * @ingroup threads + * + * @deprecated Use Task instead. + * + * @note Since this class is used in ThreadGroup, its constructors, rather + * than the class itself, are deprecated to allow compilation with + * -Werror=deprecated-declarations. */ template class Thread @@ -578,6 +583,7 @@ namespace Threads /** * Construct a thread object with a function object. */ + DEAL_II_DEPRECATED_EARLY Thread(const std::function &function) : thread_descriptor(new internal::ThreadDescriptor()) { @@ -590,11 +596,13 @@ namespace Threads * this way, except for assigning it a thread object that holds data * created by the new_thread() functions. */ + DEAL_II_DEPRECATED_EARLY Thread() = default; /** * Copy constructor. */ + DEAL_II_DEPRECATED_EARLY Thread(const Thread &t) : thread_descriptor(t.thread_descriptor) {} @@ -885,9 +893,11 @@ namespace Threads * value for the called function. * * @ingroup threads + * + * @deprecated Use TaskGroup instead. */ template - class ThreadGroup + class DEAL_II_DEPRECATED_EARLY ThreadGroup { public: /**