Boost logo

Boost :

From: Jesse Jones (jejones_at_[hidden])
Date: 2000-08-10 16:35:56


>Hi,
>--- Kevlin Henney <kevlin_at_[hidden]> wrote:
>> 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.
>
>My understanding is that Greg says we don't need the primitives at all!
>Monitors are sufficient and the better tool: The primitives are error
>prone but people will use them if they are there. Thus, we should drop
>them in favour of the better tool improving overall code quality. I
>think this is a reasonable approach!

Given how heinous threading bugs can be this sounds reasonable to me as
well. However I'm not sure we should omit a bare-bones mutex object.
Monitors sound nice for writing threaded code, but what if I just want to
protect a shared resource that may or may not be used in a threaded app? A
monitor seems awfully heavy weight for something like this...

  -- Jesse


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