Boost logo

Boost :

From: jpanzer_at_[hidden]
Date: 2000-08-09 16:59:11

Greg Colvin wrote:

> What is the simplest, safest language construct we know of for managing
> concurrent access to data? I would say the monitor,

... description snipped ...

> I do not propose specific notification of waiters. Rather, leaving the
> scope of a monitor automatically notifies all waiters. I am aware that
> this can cause a "thundering herd" performance problem, but I am also
> aware that failure to notify the appropriate waiter is a common cause of
> deadlock.

We could make broadcast notification be the default, and allow an override.
I think there's a need to be able to ensure FIFO ordering of
awakened waiters as well... how is this normally done when using

> I expect this proposal to be criticized for missing some "essential"
> feature. If so, such a feature can be added. Before doing so let us
> be sure that it is truly essential, and that it can be implemented
> on every platform we can imagine porting to.

Timeouts. Waiters _must_ be able to specify timeouts for real code, and
be able to tell whether or not they grabbed the resource. Not sure how
to add this to the monitor interface, as the timeout time might need to
vary per-call.

John Panzer

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