Boost logo

Boost :

From: Greg Colvin (gcolvin_at_[hidden])
Date: 2000-08-09 15:01:55

From: <jpanzer_at_[hidden]>
> 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.

Explicit notification is the usual "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
> monitors?

I don't understand the need, but I think you could program your own
queue for such a purpose, although I think a FIFO is the typical

> > 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.

An optional timeout parameter to the wait() method?

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