
12 Jul
2004
12 Jul
'04
8:28 p.m.
Howard Hinnant <hinnant@twcny.rr.com> 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