Boost logo

Boost Users :

From: David Abrahams (dave_at_[hidden])
Date: 2003-10-21 06:31:59


Weston Markham <wmarkham_at_[hidden]> writes:

> It strikes me as odd that waiting on a condition variable is not const. It
> seems to me that, although one does expect the condition variable to change
> state, one is not actually requesting the change, but instead is merely
> detecting a change made by another thread.
>
> I can understand that, internally, the condition variable is probably
> keeping lists of waiting threads, which would need to be modified in order
> to satisfy the wait() call. From the point of view of the calling code,
> however, I think that this is irrelevant.
>
> Is there some other sense in which calling wait() can be considered to
> modify the condition variable?

I think that's a very sharp observation.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net