Message du 02/04/11 01:59 De : "Panagiotis Foteinos"
A : boost-users@lists.boost.org Copie à : Objet : [Boost-users] [boost::mutex] Suspicious EINVAL error
Hello users.
I am running a single thread which locks and unlocks mutexes, and I get the following error: *
/usr/include/boost/thread/pthread/mutex.hpp:55: void boost::mutex::lock(): Assertion `!pthread_mutex_lock(&m)' failed,
*after a boost::shared_mutex::lock() or a boost::shared_mutex::try_lock().
I do realize that the information I provide in this email is little, but I, being new in boost::mutexes and having spent so much time on it, decided to give it a shot.
Hi, this kind of error is quite common. It seems that you try to lock the mtx twice. Could you show the error when you have a try_lock? Do you use the RAII locks that ensure that lock/unlock are pairwise? Best, Vicente