Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2004-07-22 17:46:46


Howard Hinnant <hinnant_at_[hidden]> writes:

> The (proposed) move assignment philosophy is:
>
> l1 = move(l2);
>
> behaves as if:
>
> atomic
> {
> if (l1.locked())
> l1.unlock();
> if (l2.locked())
> {
> l2.unlock();
> l1.lock();
> }
> }
>
> So in your example l2 would be unlocked, l1 would remain locked, and
> the underlying mutex lock count would be decremented by 1.

weird; the mutex association is not transferred along with
"locked-ness"?

Uh-oh: I think I just invoked the locked-ness monster.

-- 
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