Boost logo

Boost :

From: Howard Hinnant (hinnant_at_[hidden])
Date: 2004-07-22 07:30:45


On Jul 21, 2004, at 8:30 PM, Howard Hinnant wrote:

> On Jul 21, 2004, at 7:16 PM, David Abrahams wrote:
>
>> Howard Hinnant <hinnant_at_[hidden]> writes:
>>
>>> <nod> How's:
>>>
>>> scoped_lock lk1(m, defer_lock); // not locked
>> ^^^^ ^^^^
>>
>> Redundant. "deferred" is better.
>
> I seriously thought about deferred. The word, whatever it is, if
> standardized, would be at namespace scope in namespace std. I was
> worried about it conflicting, or with its use not being easily
> associated with locks if it was just "deferred". Otoh, it is only a
> tag. Maybe it is a feature, not a bug for "deferred" to be able to
> influence (conflict with) things other than locks! Thanks for the
> second thought.

Oh, I just remembered another reason I chose defer_lock over deferred.
I was trying to be symmetric with the try-counterpart:

scoped_lock lk1(m, defer_lock);
scoped_lock lk2(m, try_lock);

vs:

scoped_lock lk1(m, deferred);
scoped_lock lk2(m, tried);

<shrug> I disliked "tried" more than I liked "deferred". And I also
felt that the benefit of symmetry was important to make the interface
easier to learn.

-Howard


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