Hi After our migration from Boost 1.30.2 to Boost 1.31.0 several multithreaded tests no longer work stable. We tracked it down to the macros BOOST_UT_LOG_BEGIN and BOOST_UT_LOG_END. When one protects this macro calls with a mutex, the tests work stable again. After the investigation we found 'Support for the testing of multithreaded programs.' on the open issues list of Boost.Test. Does this mean that Boost.Test is not thread-safe at all? Do we misuse Boost.Test by calling things like BOOST_CHECK_EQUAL, BOOST_CHECK and BOOST_REQUIRE concurrently from different threads? Any clarification on this topic is welcome. Best regards, Peter.
Does this mean that Boost.Test is not thread-safe at all?
No. You could use Boost.Test to test multithreaded application - I do not use any non-thread safe function internally; but not the way you do it.
Do we misuse Boost.Test by calling things like BOOST_CHECK_EQUAL, BOOST_CHECK and BOOST_REQUIRE concurrently from different threads?
Yes. At the moment Boost.Test does not support concurrent access from different threads. If you have patch to make it work portably, feel free to submit it.
Any clarification on this topic is welcome.
Best regards, Peter.
Regards, Gennadiy.
participants (2)
-
Gennadiy Rozental
-
p.klotz@icoserve.com