There is a bug in concurrent_monitor.cpp/h when compiled withTBB_USE_ASSERT=1 TBB_USE_DEBUG=0
There is an assertion in the concurrent_monitor destructor which verify the waitset is empty, but in four places inside this files the waitset is cleared only where TBB_USE_DEBUG is true (look for "temp.clear()").
When compiled with previously mentioned settings, the waitset is not cleared and the assertion in the constructor fails.
I patched the #if's, the minimal change to be able to build, and I'llsubmit the patch though the submision form ASAP.
The waitset is in all the 4 places a temporary object and the clear() is the last instruction before the end of the definition scope, so the #if seems OK, since the clear function only resets value of some internal variables.
I'm talking about thecircular_doubly_linked_list_with_sentinel destructor not the concurrent_monitor one.
There are only 3 "temp.clear()", the fourth correction is in the "#if !TBB_USE_DEBUG" around the private keyword incircular_doubly_linked_list_with_sentinel which must be changed to "#if !TBB_USE_DEBUG && !TBB_USE_ASSERT".
Hi, Could you give us more detail? I don't seem to reproduce the issue. temp.clear() is wrappend around by '#if TBB_USE_ASSERT', it is called when TBB_USE_ASSERT==1; and __TBB_ASSERT is defined when TBB_USE_ASSERT==1. And, could you check if you have the latest TBB release?