From: Timo Heister Date: Thu, 28 May 2020 19:45:33 +0000 (-0400) Subject: provide Thread also without TBB X-Git-Tag: v9.3.0-rc1~1520^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f55f4e4d833be35408acf621801bf4623b7ee47b;p=dealii.git provide Thread also without TBB There is no reason to guard ThreadDescriptor and Threads with DEAL_II_WITH_THREADS as this is equal to DEAL_II_WITH_TBB. --- diff --git a/include/deal.II/base/thread_management.h b/include/deal.II/base/thread_management.h index de868ab064..d50787e448 100644 --- a/include/deal.II/base/thread_management.h +++ b/include/deal.II/base/thread_management.h @@ -372,8 +372,6 @@ namespace Threads namespace internal { -# ifdef DEAL_II_WITH_THREADS - /** * A class that represents threads. For each thread, we create exactly one * of these objects -- exactly one because it carries the returned value @@ -516,45 +514,6 @@ namespace Threads } } }; - -# else - /** - * A class that represents threads. For each thread, we create exactly one - * of these objects -- exactly one because it carries the returned value - * of the function called on the thread. - * - * While we have only one of these objects per thread, several - * Threads::Thread objects may refer to this descriptor. - */ - template - struct ThreadDescriptor - { - /** - * An object that will hold the value returned by the function called on - * the thread. - */ - std::shared_ptr> ret_val; - - /** - * Start the thread and let it put its return value into the ret_val - * object. - */ - void - start(const std::function &function) - { - ret_val = std::make_shared>(); - call(function, *ret_val); - } - - /** - * Wait for the thread to end. - */ - void - join() - {} - }; - -# endif } // namespace internal