
22 Jul
2004
22 Jul
'04
10:46 p.m.
Howard Hinnant <hinnant@twcny.rr.com> 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