Boost logo

Boost :

From: Beman Dawes (beman_at_[hidden])
Date: 2000-08-22 10:39:28

William Kempf wrote:

> ...
>> Another possibility, which I think Beman already suggested, is to
>> expose the mutex as a smart pointer class with an operator-> that
>> handles the locking.
>This is a very old technique. It can be a useful one, but it doesn't
>solve all of the problems (mot notably it won't solve the problem of
>multiple calls on an object needing to occur synchronously).

Could you explain that in a bit more detail? Sorry to be dense. Do you
mean there are some use patterns that require two (or more) member
functions be called as a unit? Is that a design problem with the class
being wrapped?

>Further, it requires some discipline from the programmer.

I'm missing that too. The point of the wrapper was that the programmer
wouldn't have to apply a discipline.


Boost list run by bdawes at, gregod at, cpdaniel at, john at