From 63a62efac38ba3d4857bb595f91ab45a000fa5fe Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Thu, 23 Dec 2021 21:31:03 -0700 Subject: [PATCH] Deprecate the new_thread() functions. --- include/deal.II/base/thread_management.h | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) 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) -- 2.39.5