From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id pBHDV7l0002875 for ; Sat, 17 Dec 2011 14:31:07 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ap4EAMGY7E6Tr58C/2dsb2JhbABDhQynUIIcBBFANgIFEwMLAgsDAgECAVgIAQGHeJdQjgKRK4EvhzuCBIEWBJR+ki4 X-IronPort-AV: E=Sophos;i="4.71,368,1320620400"; d="scan'208";a="135850630" Received: from gatekeeper.dcs.fiit.stuba.sk (HELO mail.fiit.stuba.sk) ([147.175.159.2]) by mail1-smtp-roc.national.inria.fr with ESMTP; 17 Dec 2011 14:31:02 +0100 Received: from dcs.fiit.stuba.sk (dcs.fiit.stuba.sk [147.175.98.42]) by mail.fiit.stuba.sk (8.14.3/8.11.1) with ESMTP id pBHDV12r050876 for ; Sat, 17 Dec 2011 14:31:01 +0100 (CET) (envelope-from kosik@fiit.stuba.sk) X-Virus-Scanned: amavisd-new at fiit.stuba.sk Received: from mkosik.celoxica.com (host217-37-171-137.in-addr.btopenworld.com [217.37.171.137]) (authenticated bits=0) by dcs.fiit.stuba.sk (8.13.8/8.13.8) with ESMTP id pBHDUu1X004147 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sat, 17 Dec 2011 14:30:57 +0100 Message-ID: <4EEC9990.3000102@fiit.stuba.sk> Date: Sat, 17 Dec 2011 13:30:56 +0000 From: Matej Kosik User-Agent: Mozilla/5.0 (X11; Linux i686; rv:8.0) Gecko/20111115 Thunderbird/8.0 MIME-Version: 1.0 To: caml-list@inria.fr Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on dcs.fiit.stuba.sk X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.0 (mail.fiit.stuba.sk [147.175.99.1]); Sat, 17 Dec 2011 14:31:01 +0100 (CET) Subject: [Caml-list] Thread.exit Hello, I use the threads library. I would like to ask if Thread.exit must have the following type: unit -> unit instead of: unit -> 'a i.e. the same as the type of Pervasives.exit. In my code: let bits = try receive () with Channel.End -> close (); Thread.exit (); exit 0 in I must make a bogus call "exit 0" empty to make the type-checker happy. If "Thread.exit" had the same type as "Pervasives.empty", it would not be necessary. It is not a big problem, but I think this is unnecessary constraint and if removed, I could simply write: let bits = try receive () with Channel.End -> close (); Thread.exit () in (i.e. without confusing bogus calls) Maybe I am just too sensitive, but I would still be interested in these small improvements, if they make sense. Regards,