2014-02-13 17:44 GMT+08:00 Igor R
: I use boost1.52 on windows2003sp2, boost::unique_lock throw a exception, please help me.
stack is: RaiseException _CxxThrowException
boost::throw_exceptionboost::lock_error[e:\library\boost_1_52\boost\throw_exception.hpp:67]
boost::shared_mutex::timed_lock[e:\library\boost_1_52\boost\thread\win32\shared_mutex.hpp:430]
boost::shared_mutex::lock[e:\library\boost_1_52\boost\thread\win32\shared_mutex.hpp:382]
boost::unique_lockboost::shared_mutex::lock[e:\library\boost_1_52\boost\thread\locks.hpp:510]
Do you lock or unlock the mutex twice?
On Thu, Feb 13, 2014 at 10:29:54PM +0800, shada wrote:
I have review my code, not lock or unlock twice.
That's nice that you feel that way. Without a reasonably small test case or at a minimum relevant snippets, I don't see what you intend for the list to do with your problem. Try to condense your faulting application to a small self-contained test case that still demonstrates the problem. Also consult the documentation for Boost.Thread so you know what this exception means and what constraints you have on the locking and unlocking of lockable objects. Finally, on these lists when you reply you should write your response below the part you're reponding to or at the very least at the end of the mail. Have a nice day, -- Lars Viklund | zao@acc.umu.se