Opened 9 years ago
Closed 9 years ago
#8904 closed Bugs (fixed)
boost/smart_ptr/detail/atomic_count_pthreads.hpp: Ignores all failures from pthread_* functions
Reported by: | Owned by: | Peter Dimov | |
---|---|---|---|
Milestone: | To Be Determined | Component: | smart_ptr |
Version: | Boost 1.54.0 | Severity: | Problem |
Keywords: | smart_ptr pthread mutex API failure | Cc: |
Description
boost/smart_ptr/detail/atomic_count_pthreads.hpp ignores all failures from pthread_* functions. Functions include pthread_mutex_init, pthread_mutex_lock, pthread_mutex_unlock and pthread_mutex_destroy.
Perhaps it would be a good idea to use boost/thread/pthread/mutex.hpp. It appears to have more stability and throws lock exceptions where appropriate.
Use of BOOST_ASSERT would also be a good idea so developers can learn the point of first failure quickly without resorting to debugging.
Note:
See TracTickets
for help on using tickets.
In https://github.com/boostorg/smart_ptr/commit/4c8a55898239048a72dbfc1f936c7a4b19469041.