From: Kevlin Henney (kevlin_at_[hidden])
Date: 2000-05-31 12:34:59
In message <04fd01bfcb24$bfb4c6a0$b10f05d4_at_schobi>, Hendrik Schober
>> Bjarne Stroustrup gave a talk (technetcast from somewhere) where he
>> mentioned he was going to publish an article regarding a neatly transparent
>> concurrency idea. From memory, he was overloading operator-> to lock on use
>> and the object returned from the operator-> would unlock. Has anyone a
>> reference to this?
> Maybe this:
> > Features
> > Wrapping C++ Member Function Calls
> > Bjarne Stroustrup
> > This article presents a simple, general, and efficient
> > solution for wrapping calls to member functions of a class in
> > pairs of prefix and suffix code. The solution is nonintrusive,
> > applies to existing classes, allows the use of several prefix/
> > suffix pairs, and can be implemented in 15 simple lines of
> > Standard C++. Stroustrup organizes his discussion around a
> > series of examples evolving the basic idea into a final robust
> > template class.
I think this technique also came up on Boost last year. I first applied
and presented it ~1995, and I'm sure there must be examples from before
that, so I guess it's been around a while.
I was about to write a column for C++ Report on the very same topic when
Herb fortunately pointed out that Bjarne had already done so! However,
if anyone's interested I have a current paper (submitted to EuroPLoP)
that includes coverage of this idiom.
Kevlin Henney phone: +44 117 942 2990
Curbralan Ltd mobile: +44 7801 073 508
kevlin_at_[hidden] fax: +44 870 052 2289
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk