Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2004-07-19 14:55:19


"Peter Dimov" <pdimov_at_[hidden]> 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

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk