From: Vesa Karvonen (vesa.karvonen_at_[hidden])
Date: 2001-07-21 20:14:35
From: "Aleksey Gurtovoy" <alexy_at_[hidden]>
> Vesa Karvonen wrote:
> > Personally, I have been using a class template 'locked',
> > which is basically a handle to a lockable or guarded
> > object/resource. It is similar to, but not the same as, the
> > LockingPtr presented in
> > http://www.cuj.com/experts/1902/alexandr.htm?topic=experts.
> > The main implementation difference is that lockable only
> > stores a single pointer.
Actually, 'locked' doesn't use the volatile/const_cast<> thing either, which
can be thought of as being even more significant. However, the basic intent
behind 'locked', 'LockingPtr', and 'locking_ptr' is the same.
> There was a long thread in news:comp.lang.c++.moderated regarding the
> Andrei's LockingPtr technique, and I believe that 'need_locking' class
> template described in the following article:
> is pretty much equivalent to your 'guarded' class.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk