Skip to content

Explicitly mark the destructor of GaudiParallelizer as noexcept(true)

This is a fix for Gaudi failing to build against recent releases of Intel TBB (see JIRA issue GAUDI-1187 ).

The problem is that the destructor of GaudiParallelizer violates its noexcept contract, which is inherited from GaudiAlgorithm, due to tbb::task_group's destructor being marked noexcept(false) since TBB 4.2 Update 4 (see https://www.threadingbuildingblocks.org/sites/default/files/resources/CHANGES_0.txt ).

After some discussion, the least bad option seems to be explicitly marking said destructor as noexcept(true), which in essence amounts to ignoring the possibility of a TBB task group destructor throwing an exception. This will result in an application crash if the TBB task group destructor does indeed throw, however a destructor throwing is not an acceptable C++ coding practice anyway, so if we see it happening we should report it to Intel as a bug.

I also moved the empty destructor body to GaudiParallelizer's header and added a comment in order to clarify that once Intel have sorted out the issue on their side, we should delete this destructor.

Merge request reports