From: David Abrahams (dave_at_[hidden])
Date: 2007-08-22 10:36:09
on Tue Aug 21 2007, Howard Hinnant <howard.hinnant-AT-gmail.com> wrote:
> This line:
> unique_lock<_L1> __u1(__l1);
> implicitly calls __.l1.lock() inside of the unique_lock constructor.
> If __l1 is a mutex, the deed is done. If __l1 is a lock, hopefully
> that will forward to the referenced mutex's lock() function in the
> proper manner. And in the process, that should set the lock's owns()
> data to true as well.
That's part of what I found counfounding about the name "unique_."
Now you have two locks (__l1 and __u1) that "own" the mutex.
-- Dave Abrahams Boost Consulting http://www.boost-consulting.com The Astoria Seminar ==> http://www.astoriaseminar.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk