Boost logo

Boost Users :

Subject: Re: [Boost-users] [Thread] why isn't it possible to acquire 2 different upgrade_lock from 2 different threads?
From: Elad Moshe (eladm26_at_[hidden])
Date: 2014-03-30 03:38:12


Ok, got it.
Thanks you all very much.

On Thu, Mar 27, 2014 at 7:11 PM, Steven Watanabe <watanabesj_at_[hidden]>wrote:

> AMDG
>
> On 03/27/2014 09:09 AM, Elad Moshe wrote:
> >> If both threads tried to upgrade, you would have a deadlock.
> >
> > But how is it possible? isn't the upgrade operation atomic?
> > if the 2 threads try to upgrade, one will succeed and the other one will
> > block until the first thread will unlock.
> >
>
> If it worked this way, it would mean that upgrade
> lock would not exclude concurrent writes, which
> completely defeats the point of using it in the
> first place.
>
> In Christ,
> Steven Watanabe
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>



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