15 std::vector<std::thread> m_threads;
16 std::exception_ptr m_eptr;
17 std::mutex m_eptr_mutex;
27 m_threads.emplace_back([
this, f = std::forward<F>(f)]()
mutable {
31 std::lock_guard<std::mutex> lock(m_eptr_mutex);
33 m_eptr = std::current_exception();
41 for (
auto& t : m_threads) {
48 std::exception_ptr e = m_eptr;
50 std::rethrow_exception(e);
56 for (
auto& t : m_threads) {