
19 Jul
2004
19 Jul
'04
7:55 p.m.
"Peter Dimov" <pdimov@mmltd.net> writes:
I mostly agree with Bronek Kozicki. Given a movable lock, Eric Niebler's proposal:
scoped_lock try_lock( Mutex & m ); scoped_lock timed_lock( Mutex & m );
is a better try/timed interface. Heisenberg constructors must die.
I'm not sure if there are any advantages, but try_lock and timed_lock could actually be derived classes of scoped_lock in that case, using an intentionally slicing move. -- Dave Abrahams Boost Consulting http://www.boost-consulting.com