Class ParallelExceptionCollector¶
Defined in File runtime.hpp
Class Documentation¶
-
class ParallelExceptionCollector¶
collects the exceptions thrown by the invocations of the work function of a parallel primitive, which must not escape them: an exception escaping a parallel algorithm’s element function or a std::thread calls std::terminate
Public Functions
-
template<typename F>
inline void run(std::size_t item, F &&f) noexcept¶ invokes
f, recording an exception it throws as that of itemitem
-
inline void rethrow()¶
once the work is done: rethrows the recorded exception if there is one, throws ParallelExceptions if there are several, else does nothing
-
template<typename F>