
I've been looking at the implementation of recursive_try_mutex, and something struck me as odd in the pthreads implementation: bool recursive_try_mutex::do_trylock() { # if defined(BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE) int res = 0; res = pthread_mutex_trylock(&m_mutex); assert(res == 0); if (res == 0) { if (++m_count > 1) { res = pthread_mutex_unlock(&m_mutex); assert(res == 0); } return true; } return false; # else // ... } It appears that if BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE is defined, in debug mode this function will never return false, because the assert will fire first instead. Am I reading this incorrectly, or is there something happening somewhere else that I'm missing? Thanks in advance, Christopher Currie [Non-text portions of this message have been removed]