From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id JAA11297; Thu, 4 Oct 2001 09:51:27 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id JAA11292 for ; Thu, 4 Oct 2001 09:51:26 +0200 (MET DST) Received: from porsta.cs.Helsinki.FI (porsta.cs.Helsinki.FI [128.214.48.124]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id f947pPP28756; Thu, 4 Oct 2001 09:51:25 +0200 (MET DST) Received: from melkinpaasi.cs.Helsinki.FI (sslwrap@localhost [127.0.0.1]) by porsta.cs.Helsinki.FI (8.11.6/8.11.6) with ESMTP id f947pOG27248; Thu, 4 Oct 2001 10:51:25 +0300 Received: (from ekarttun@localhost) by melkinpaasi.cs.Helsinki.FI (8.11.6/8.11.2) id f947pLU10533; Thu, 4 Oct 2001 10:51:21 +0300 Date: Thu, 4 Oct 2001 10:51:21 +0300 From: Einar Karttunen To: Damien Doligez Cc: caml-list@inria.fr Subject: Re: [Caml-list] Pattern matcher no more supposed to warn on non exhaustive patterns ? Message-ID: <20011004105121.A9944@cs.helsinki.fi> References: <200110040736.JAA0000032278@beaune.inria.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200110040736.JAA0000032278@beaune.inria.fr>; from damien.doligez@inria.fr on Thu, Oct 04, 2001 at 09:36:50AM +0200 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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: 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