Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BUG: Use
lock_guard<mutex>
in FFT configuration to deal with exception
When calling `lock()` and `unlock()` explicitly, throwing an exception between between those two calls would leave the mutex locked, which appears undesirable. Used `std::lock_guard` to solve this problem. Following C++ Core Guidelines, April 13, 2023, "Use RAII, never plain `lock()`/`unlock()`" https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#cp20-use-raii-never-plain-lockunlock Also replaced manual creation of an exception with an `itkGenericExceptionMacro` call.
- Loading branch information