From ec43890e1aa91e694a75b1b73e822e792734005f Mon Sep 17 00:00:00 2001 From: Simon Rit Date: Mon, 4 Oct 2021 12:44:15 +0200 Subject: [PATCH] BUG: fix exception handling in itk::PoolMultiThreader Exception thrown in most threads were not caught. Fixes #2776. --- Modules/Core/Common/src/itkPoolMultiThreader.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/Modules/Core/Common/src/itkPoolMultiThreader.cxx b/Modules/Core/Common/src/itkPoolMultiThreader.cxx index 8c3087621bb..dfab46b82cd 100644 --- a/Modules/Core/Common/src/itkPoolMultiThreader.cxx +++ b/Modules/Core/Common/src/itkPoolMultiThreader.cxx @@ -302,6 +302,7 @@ PoolMultiThreader::ParallelizeImageRegion(unsigned int dimension, filter->IncrementProgress(0); } } while (status != std::future_status::ready); + m_ThreadInfoArray[i].Future.get(); reporter.CompletedPixel(); }); }