Boost logo

Boost Users :

Subject: Re: [Boost-users] Fwd: boost::unique_lock throw a exception
From: Lars Viklund (zao_at_[hidden])
Date: 2014-02-13 11:53:22


> 2014-02-13 17:44 GMT+08:00 Igor R <boost.lists_at_[hidden]>:
>
> > > I use boost1.52 on windows2003sp2, boost::unique_lock throw a exception,
> > please help me.
> > >
> > > stack is:
> > > RaiseException
> > > _CxxThrowException
> > >
> > boost::throw_exception<boost::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_lock<boost::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_at_[hidden]

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net