Boost logo

Boost :

From: Kevlin Henney (kevlin_at_[hidden])
Date: 2000-08-10 11:49:52


In message <8mui65+jteo_at_[hidden]>, William Kempf <sirwillard_at_my-
deja.com> writes
>I've taken a look at the classic 1974 paper by Hoare, and this paper
>has a very good example of why the simplistic monitor you've
>described can not be a replacement for conditions. He's got an
>example of a read/write lock implemented using his concept of a
>monitor. The implementation requires two conditions. I'm not sure
>that a monitor deserves first class implementation in a C++ library
>given this. The monitor as Hoare describes it may simply be a
>programming idiom used with mutexes and conditions. That's
>definately something that's up to debate, but I think I've proven to
>myself that we can't do with out the primitives mutex and condition
>just because we include a monitor.

Yes, I am not sure why we are having a discussion on monitors vs
mutexes. Mutexes (and conditions) provide us with a primitive layer on
which we can build the higher-level programming models. If you like,
monitors are applied mutexes/conditions.

So without synchronisation primitives in our library we can't build
monitors, but with only monitors we can't easily build concurrent apps
:->

We should provide the primitives that allow monitors and other
approaches to be built, as well as providing some of these higher-level
concepts directly in the library.
____________________________________________________________

  Kevlin Henney phone: +44 117 942 2990
  Curbralan Ltd mobile: +44 7801 073 508
  kevlin_at_[hidden] fax: +44 870 052 2289
____________________________________________________________


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk