Subject: [Boost-bugs] [Boost C++ Libraries] #8916: boost/signals2/detail/lwm_pthreads.hpp: Ignores all failures from pthread_* functions
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-07-25 04:52:16
#8916: boost/signals2/detail/lwm_pthreads.hpp: Ignores all failures from pthread_*
functions
------------------------------------------------+----------------------
Reporter: Jeffrey Walton <noloader@â¦> | Owner: fmhess
Type: Bugs | Status: new
Milestone: To Be Determined | Component: signals2
Version: Boost 1.54.0 | Severity: Problem
Keywords: signals2 mutex pthread API failure |
------------------------------------------------+----------------------
boost/signals2/detail/lwm_pthreads.hpp ignores all failures from pthread_*
functions. Functions include pthread_mutex_init, pthread_mutex_lock,
pthread_mutex_unlock and pthread_mutex_destroy.
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.
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.
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.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/8916> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:13 UTC