Boost logo

Boost :

From: Vesa Karvonen (vesa.karvonen_at_[hidden])
Date: 2001-07-21 17:04:39


From: "Aleksey Gurtovoy" <alexy_at_[hidden]>
> Vesa Karvonen wrote:
[...]
> > The following mainly describes guarded, which is a simple
> > template I developed a long time ago. I haven't noticed the
> > same concept anywhere before, but I suspect that it can be
> > found in many C++ libraries for concurrent programming.
[...]
> > I'm also interested to know of other implementations and
> > refinements of this concept.
>
> 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:
>
> http://groups.google.com/groups?th=9e0488ed4f4a80f4,426&rnum=185&selm=94ccng
> %24m2t%241%40nnrp1.deja.com
>
> is pretty much equivalent to your 'guarded' class.

Looks very nice!

The implementation of 'need_locking' is a bit different, but the intent seems
to be the same as with 'guarded'. In case you are curious, then checking from
SourceSafe, the earliest header that has guarded (we have one obsolete and
another current library that implements the 'guarded'/'need_locking' concept)
is dated 24th of April 1999. However, IIRC, I originally called it
'synchronized' and later changed to 'guarded', because I was convinced it was
a better name (I should really take the time to memorize the related
vocabulary). Now, checking from SourceSafe history, I first checked-in
'synchronized.h' on 29th of January 1999 (at 02:56 - inspiration doesn't watch
the clock). Unfortunately the original file no longer exists.

[I have no interest to contribute to the C++ newsgroups.]


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