Boost logo

Boost :

From: jsiek_at_[hidden]
Date: 2000-08-22 12:13:25


This brings up an issue with our Mutex design... currently the scoped
lock object is the only way to access the lock/unlock functionality.
This wrapper technique needs access to lock/unlock. Perhaps we should
make lock/unlock a protected member. This wrapper could then gain
access through subclassing. This essentially makes lock/unlock a part
of the "public" interface, though it gives a warning to users.

(note that if we have a lock() function we have to change the name of
the lock type to something else, or vice versa)

Beman Dawes writes:
> Greg Colvin 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.
>
> Here is an example of the member function wrapping trick from Bjarne.

----------------------------------------------------------------------
 Jeremy Siek www: http://www.lsc.nd.edu/~jsiek/
 Ph.D. Candidate email: jsiek_at_[hidden]
 Univ. of Notre Dame cell phone: (415) 377-5814
----------------------------------------------------------------------


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