Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2004-07-07 10:59:33


"Peter Dimov" <pdimov_at_[hidden]> writes:

> This is certainly possible, but I don't see what the additional complexity
> buys us.
>
> TryLock l( m, false );
>
> if( l.try_lock() )
> {
> }
>
> looks acceptable to me.
>
> TryLock l( m, non_blocking );
>
> if( l.locked() )
> {
> }
>
> doesn't seem much of an improvement.

It does to me. I like names that say what they mean; false could
easily be misinterpreted.

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