From: Peter Dimov (pdimov_at_[hidden])
Date: 2004-07-15 09:48:24
Michael Glassford wrote:
> Question: does this mean unification of the lock concepts, too?
This is a very interesting question. At first sight the answer seems a
trivial "no" because, strictly speaking, the lock template still does
describe three concepts. What is interesting is whether we need lock
concepts at all.
In Boost.Threads, a lock concept is only needed (I believe) in
condition::wait. But condition::wait is not actually generic. It only
pretends to work with any class that is-a Lock, but in reality, it requires
one of Boost.Threads locks.
Note that the question is not whether the world needs lock concepts. The
question is whether it is our responsibility to define them, if we don't
actually use them anywhere.
A related question is: given a mutex M, is the lock type obtainable via
M::scoped_lock, as before, or is it simply scoped_lock<M>?
Given my preference for simplifying as much as possible (but no further),
you could probably tell how I'd answer the two questions above. ;-)
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk