From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: * X-Spam-Status: No, score=1.2 required=5.0 tests=AWL,RCVD_IN_NJABL_PROXY, RCVD_IN_SORBS_SOCKS autolearn=disabled version=3.1.3 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 10BEBBC6B for ; Tue, 28 Aug 2007 01:34:08 +0200 (CEST) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.171]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id l7RNY7Br003617 for ; Tue, 28 Aug 2007 01:34:07 +0200 Received: from dslb-084-059-120-183.pools.arcor-ip.net [84.59.120.183] (helo=gate.lan.gerd-stolpmann.de) by mrelayeu.kundenserver.de (node=mrelayeu8) with ESMTP (Nemesis), id 0ML31I-1IPo5l3S58-0001T3; Tue, 28 Aug 2007 01:33:58 +0200 Received: from flakew.lan.gerd-stolpmann.de (fw.lan.gerd-stolpmann.de [192.168.1.1]) by gate.lan.gerd-stolpmann.de (Postfix) with ESMTP id 697EFC054; Tue, 28 Aug 2007 01:33:57 +0200 (CEST) Subject: Re: [Caml-list] Has the thread cancellation problem evolved ? From: Gerd Stolpmann To: skaller Cc: Daniel =?ISO-8859-1?Q?B=FCnzli?= , caml-list@yquem.inria.fr In-Reply-To: <1188055755.10796.37.camel@rosella.wigram> References: <9FA25C33-04DD-46BD-8959-873DDD2FFF82@epfl.ch> <1188055755.10796.37.camel@rosella.wigram> Content-Type: text/plain Date: Tue, 28 Aug 2007 01:33:56 +0200 Message-Id: <1188257636.7533.23.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.6.1 Content-Transfer-Encoding: 7bit X-Provags-ID: V01U2FsdGVkX190crMJqY5ePGCW0whvtFLxqBkb4RzdkMHXh6W CRcfuDcs8dsLypC0iWYeQpNrU5mpFyGm4DY9CXb8eJAHaC5nV4 2C476kUg7httzMWSjXV6+tB8YOvcNJH X-Miltered: at concorde with ID 46D35F6F.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; gerd:01 stolpmann:01 gerd:01 stolpmann:01 o'caml:01 runtime:01 viktoriastr:01 64293:01 darmstadt:01 6151:01 6151:01 threads:01 threads:01 exception:01 exception:01 Am Sonntag, den 26.08.2007, 01:29 +1000 schrieb skaller: > > [5] by Gerd Stolpmann is > > portable. Note however that neither solution will work with > > uncooperative threads, i.e. those that never perform any system call > > or trigger the gc [7]. > > And it is almost certainly not portable. Portable means on ALL > operating systems .. including Windows. Just reading again what I suggested two years ago. This suggestion is implementable on Windows, as the O'Caml runtime has its own mechanisms to check for asynchronous events (it is needed for switching between threads). Nevertheless, I don't think this is a good thing. Raising an exception at potentially any moment is a problematic thing. E.g. code like let x = try Some(List.assoc ... with _) -> None where the author implicitly assumes that it is only Not_found that can happen and the code is just plain wrong if anything else is encoded into the exception. Gerd -- ------------------------------------------------------------ Gerd Stolpmann * Viktoriastr. 45 * 64293 Darmstadt * Germany gerd@gerd-stolpmann.de http://www.gerd-stolpmann.de Phone: +49-6151-153855 Fax: +49-6151-997714 ------------------------------------------------------------