Boost logo

Boost :

From: vicente.botet (vicente.botet_at_[hidden])
Date: 2008-05-11 12:55:49


---------------------------
Vicente Juan Botet Escriba
----- Original Message -----
From: "Anthony Williams" <anthony_w.geo_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Sunday, May 11, 2008 11:58 AM
Subject: Re: [boost] [thread] is this reverse_lock class a source of errors?

> "vicente.botet" <vicente.botet_at_[hidden]> writes:
>
>> Hi,
>>
>> Consider the following situations:
>>
>> {
>> unique_lock<mutex> lock(smtx);
>>
>> // ... some writing operations
>>
>> { // non locked block
>> reverse_lock< unique_lock<mutex> > rlock(lock);
>> // ... some code not needing the mutex to be locked
>> } // locked again
>>
>> // ...
>> }
>
>> Do you think this usage is souhaitable or is this source of errors?
>
> I've had to do it myself a few times. I think it's worthwhile adding it to
> the
> library in order to ensure it is done as safely as possible.
>
> Anthony

Great,

I'm sure you will get a highly-polished implementation.

Cheers,
Vicente


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk