Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2004-07-12 15:28:28


Howard Hinnant <hinnant_at_[hidden]> writes:

>> but that's a bit too much of a handholding for my taste, and doesn't
>> allow
>> us to use mutex() in the Effects clauses. The kind of a person that
>> would
>> delete lock.mutex() would never get a multithreaded program correct
>> anyway.
>
> If we expose either a Mutex* or a Mutex&, and we standardize a public
> Mutex interface (with lock(), unlock(), etc.), then we are saying that
> one can call functions on the pointer or reference returned by
> mutex(). And now that I write that sentence my skin is beginning to
> crawl. ;-)

Why not just build a mutex identity object that wraps a pointer?

-- 
Dave Abrahams
Boost Consulting
http://www.boost-consulting.com

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