Boost logo

Boost :

From: Yuval Ronen (ronen_yuval_at_[hidden])
Date: 2007-08-24 20:59:28

Peter Dimov wrote:
> Howard Hinnant wrote:
>> Or should condition::wait() not take any parameters, or take only
>> mutexes, making the issue moot?
> I think that we ought to keep the lock argument, even if we end up not using
> it for anything except debug checks. It helps people avoid accidental calls
> to 'wait' without locking the mutex first.

If, by "It helps people avoid accidental...", you mean "at compile
time", then it's not always detected in compile time, because the
existence of a lock doesn't mean a mutex is locked (e.g. unique_lock).
If you mean "at run time", then it can be checked without the lock being
passed as a parameter to wait(). Either way, I see no need for passing it.

Boost list run by bdawes at, gregod at, cpdaniel at, john at