From: Wolfgang Bangerth Date: Fri, 24 Dec 2021 04:31:03 +0000 (-0700) Subject: Deprecate the new_thread() functions. X-Git-Tag: v9.4.0-rc1~717^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=63a62efac38ba3d4857bb595f91ab45a000fa5fe;p=dealii.git Deprecate the new_thread() functions. --- diff --git a/include/deal.II/base/thread_management.h b/include/deal.II/base/thread_management.h index d462f14b1b..b8484a1b2a 100644 --- a/include/deal.II/base/thread_management.h +++ b/include/deal.II/base/thread_management.h @@ -753,10 +753,12 @@ namespace Threads * function object without arguments and returning an object of type RT (or * void). * + * @deprecated Use std::thread or std::jthread instead. + * * @ingroup threads */ template - inline Thread + DEAL_II_DEPRECATED inline Thread new_thread(const std::function &function) { return Thread(function); @@ -826,10 +828,12 @@ namespace Threads * or capture have a lifetime that extends at least until the time * where the thread finishes. * + * @deprecated Use std::thread or std::jthread instead. + * * @ingroup CPP11 */ template - inline auto + DEAL_II_DEPRECATED inline auto new_thread(FunctionObjectType function_object) -> Thread { @@ -843,10 +847,12 @@ namespace Threads * Overload of the new_thread function for non-member or static member * functions. * + * @deprecated Use std::thread or std::jthread instead. + * * @ingroup threads */ template - inline Thread + DEAL_II_DEPRECATED inline Thread new_thread(RT (*fun_ptr)(Args...), typename identity::type... args) { auto dummy = std::make_tuple(internal::maybe_make_ref::act(args)...); @@ -859,10 +865,12 @@ namespace Threads /** * Overload of the non-const new_thread function for member functions. * + * @deprecated Use std::thread or std::jthread instead. + * * @ingroup threads */ template - inline Thread + DEAL_II_DEPRECATED inline Thread new_thread(RT (C::*fun_ptr)(Args...), typename identity::type &c, typename identity::type... args) @@ -875,10 +883,12 @@ namespace Threads /** * Overload of the new_thread function for const member functions. * + * @deprecated Use std::thread or std::jthread instead. + * * @ingroup threads */ template - inline Thread + DEAL_II_DEPRECATED inline Thread new_thread(RT (C::*fun_ptr)(Args...) const, typename identity::type &c, typename identity::type... args)