|
Boost : |
From: jsiek_at_[hidden]
Date: 2000-08-10 15:59:47
scleary_at_[hidden] writes:
> > As for the predicate to remove the while... I considered that a lot
> > yesterday while thinking on this subject. The only problem I see is
> > that you don't always have a predicate or while loop.
>
> Right! Condition variables can also be used on their own. I've used them
> in that way before. The example given by Jeremy was using CV's as a
I'm not familiar with the usage scenario you're alluding to
here. Could you give an example?
> monitor, not as CV's in their own right. I'd recommend leaving pthread CV's
> largely as-is, but adding a Monitor class that wraps the while Predicate
> loop.
I'm not sure I like the use of the word "monitor" in this sense. I've
always thought that a monitor is a class that automatically serializes
accesses to its member functions. I know that signal() and wait() were
discussed in Hoare's paper, but I thought he was using "condition
variable" for that part of the functionality.
Cheers,
Jeremy
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk