Version française
Home     About     Download     Resources     Contact us    
Browse thread
RE: [Caml-list] Pattern matcher no more supposed to warn on non exhaustive patterns ?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Einar Karttunen <ekarttun@c...>
Subject: Re: [Caml-list] Pattern matcher no more supposed to warn on non exhaustive patterns ?
On Thu, Oct 04, 2001 at 09:36:50AM +0200, Damien Doligez wrote:
> >From: "Gregory Morrisett" <jgm@cs.cornell.edu>
> 
> >The same thing shows up in SML/NJ with CML.  The problem is that
> >in the presence of threads, you really shouldn't be able to=20
> >dereference a mutable value in your patterns.
> 
> I'd agree that core dump is surprising, but if your multi-threaded
> program does anything with a mutable value without the protection of a
> mutex, then it is incorrect (i.e. its semantics is unspecified).  In
> O'Caml, none of the operations is specified as atomic (except a few
> things in the threads library), and you shouldn't assume that they are.
> 
Is there any list of things that are atomical? I am particulary
interested in whether references are atomical? If the only
operations that threads are using on a giving reference are
setting and taking it's value is it thread safe not to use
any mutex? If references are implemented with pointers then
it should be thread safe...

- Einar Karttunen
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr