Boost logo

Boost Users :

From: William E. Kempf (wekempf_at_[hidden])
Date: 2003-05-13 12:47:03


Mark Sizer said:
> Is there a convention about whether or not to explicitly call .unlock()?
>
> In the case where everything to the end of the scope should be locked,
> there is no NEED to do it, but isn't it a bit sloppy to leave locks
> locked?

Certainly not. That's the purpose of the RAII idiom.

> Much like not using braces on one-line 'if' statements, it could cause
> maintenance problems later.

I wouldn't think so, but maybe you have a use case to share where you
think it could?

-- 
William E. Kempf

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