
22 Aug
2007
22 Aug
'07
4:19 p.m.
David Abrahams wrote:
on Mon Aug 20 2007, Howard Hinnant <howard.hinnant-AT-gmail.com> wrote:
Here is a link to a reference implementation and a FAQ for mutexes, locks and condition variables I am currently anticipating proposing for C++ standardization (or subsequent TR).
http://home.twcny.rr.com/hinnant/cpp_extensions/concurrency_rationale.html
I find the fact that unique_lock can reference a mutex without owning the mutex's lock rather confusing in light of the semantics of unique_ptr. It seems like unique_lock is looking more like the old-old auto_ptr.
I agree. If we remove the lock/try_lock/unlock from the locks, then I think it can be fixed, and we get sizeof(unique_ptr)==sizeof(unique_lock).