Boost C++ Libraries: Ticket #8915: boost/log/detail/spin_mutex.hpp: Ignores all failures from pthread_* functions https://svn.boost.org/trac10/ticket/8915 <p> boost/log/detail/spin_mutex.hpp ignores all failures from pthread_* functions. Functions include pthread_spin_init, pthread_spin_lock and pthread_spin_unlock. </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> boost/thread/pthread/mutex.hpp and boost/interprocess/sync/posix/mutex.hpp are good examples of a mature implementation. They check for failures and throw exceptions where appropriate. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/8915 Trac 1.4.3 Andrey Semashev Sat, 03 Aug 2013 13:05:32 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/8915#comment:1 https://svn.boost.org/trac10/ticket/8915#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">fixed</span> </li> </ul> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/85199" title="Added exceptions in case of errors. Fixes #8915.">[85199]</a>) Added exceptions in case of errors. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/8915" title="#8915: Bugs: boost/log/detail/spin_mutex.hpp: Ignores all failures from pthread_* ... (closed: fixed)">#8915</a>. </p> Ticket