From: Howard Hinnant (hinnant_at_[hidden])
Date: 2004-07-27 11:20:10
On Jul 27, 2004, at 10:45 AM, Christopher Currie wrote:
> Howard Hinnant wrote:
>> Ok, new spec up at:
> So, I understand that the prevaling opinion is that we should drop
> try_lock and timed_lock in favor of one all-encompasing scoped lock.
> Are we going to eliminate variations of Mutex as well, or will
> mutex/try_mutex/timed_mutex still exist?
The mutex end is still under debate. It's a good deal with locks
because you can just not use (instantiate) the try_lock and timed_lock
stuff if you don't want it, or if the mutex you're using doesn't
support it. No harm is done. This is because the lock just contains a
mutex reference and a bool, no matter what the capabilities.
But it isn't that simple for the mutex. There's a tradeoff to be made.
The more capability you stuff into a mutex, the more bloated it
becomes. But even that statement is platform dependent. Some
platforms already supply a native mutex with all the capability stuffed
in, so there is no further penalty in supplying an all-in-one
boost::mutex on such a platform.
I think at some point we realized that we could make progress on the
locks without tackling the very question you ask.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk