diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2019-02-27 09:44:37 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2019-02-27 11:53:29 +0100 |
commit | d34c0852d73b1b02115cc6c469106fabd057dbb7 (patch) | |
tree | 6bd4a2db900c0b81dfc0743f39b8d32ad5d3e27f | |
parent | e3c8943e26dbedaf427618c054f620fb6f9acf2a (diff) |
Fix GenericSolarThreadExecutor<...,void> specialization
Change-Id: I4468a3a8d036ca4894ba7977f6654244552464aa
Reviewed-on: https://gerrit.libreoffice.org/68423
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
-rw-r--r-- | include/vcl/threadex.hxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/vcl/threadex.hxx b/include/vcl/threadex.hxx index cac25bc58b75..cd511f271d2c 100644 --- a/include/vcl/threadex.hxx +++ b/include/vcl/threadex.hxx @@ -92,6 +92,16 @@ private: template <typename FuncT> class GenericSolarThreadExecutor<FuncT, void> : public SolarThreadExecutor { +public: + static void exec( FuncT const& func ) + { + typedef GenericSolarThreadExecutor<FuncT, void> ExecutorT; + ::std::unique_ptr<ExecutorT> const pExecutor( new ExecutorT(func) ); + pExecutor->execute(); + if (pExecutor->m_exc) + std::rethrow_exception(pExecutor->m_exc); + } + private: explicit GenericSolarThreadExecutor( FuncT const& func ) : m_func(func) {} |