Russell Hind wrote:
> 
> Fair enough.  My most common use is for automatically
> locking/unlocking 
> 
> void function(void)
> {
> scoped_lock lock(themutex);
>      ... do something
>      lock.unlock();
>          ... do some more
>      lock.lock();
>      ... do something else
> }
> 
> with possible a while-loop around the unlock/lock code.  From this, I
> have seen it as a coding error if I call lock without an unlock but
> this probably isn't the same for everyone.

This looks like a motivating example for scoped_unlock. :-)
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Reply via email to