|
Boost : |
From: William Kempf (sirwillard_at_[hidden])
Date: 2000-08-22 12:26:17
--- In boost_at_[hidden], jsiek_at_l... wrote:
>
> 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)
I think you're jumping to conclusions. There may be a way to code
the lock_pointer using the MutexLock (I'd bet there is, I just
haven't worked on it yet). Even if not, all that's really needed is
to make the lock_pointer a friend of the Mutex, the same as is done
for the MutexLock. I see no reason to expose the lock/unlock methods
of the mutex on the public interface.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk