Boost C++ Libraries: Ticket #8917: libs/log/src/once_block.cpp: Ignores nearly all failures from pthread_* functions https://svn.boost.org/trac10/ticket/8917 <p> libs/log/src/once_block.cpp ignores nearly all failures from pthread_* functions. Functions include pthread_mutex_init, pthread_mutex_lock, pthread_mutex_unlock and pthread_mutex_destroy. </p> <p> A lock failure is usually a bad thing, and I can't come up with scenarios where a silent failure is desired. It will make a bad problem worse by corrupting data or terminating the program. </p> <p> At minimum (as a user), I would expect for Boost to use BOOST_ASSERT with an appropriate exception in debugging and diagnostic builds; and BOOST_VERIFY with an appropriate exception for release or production builds. </p> <p> Perhaps it would be a good idea to use boost/thread/pthread/mutex.hpp or boost/interprocess/sync/posix/mutex.hpp. They appear to be more mature and have a bit more stability. In addition, it throws lock exceptions where appropriate. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/8917 Trac 1.4.3 Andrey Semashev Sat, 03 Aug 2013 13:12:29 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/8917#comment:1 https://svn.boost.org/trac10/ticket/8917#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">invalid</span> </li> </ul> <p> All pthread functions are already guarded with BOOST_VERIFY. The functions must not throw any exceptions, so the only thing that can be done is to abort in case of errors. </p> Ticket