Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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: 2001-10-04 (07:51)
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" <>
> >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:  FAQ:
To unsubscribe, mail  Archives: