From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 17C4B7EE25 for ; Tue, 19 Nov 2013 12:34:49 +0100 (CET) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of jp.deplaix@gmail.com) identity=pra; client-ip=209.85.214.44; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="jp.deplaix@gmail.com"; x-sender="jp.deplaix@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of jp.deplaix@gmail.com designates 209.85.214.44 as permitted sender) identity=mailfrom; client-ip=209.85.214.44; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="jp.deplaix@gmail.com"; x-sender="jp.deplaix@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-bk0-f44.google.com) identity=helo; client-ip=209.85.214.44; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="jp.deplaix@gmail.com"; x-sender="postmaster@mail-bk0-f44.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkYDAAJMi1LRVdYslWdsb2JhbABZgz+DSbxJgR8WDgEBAQEHDQkJEiqCJQEBBSMECwENARscAQEDDAYFCw0CAgUWCwICCQMCAQIBDwIRAQUBHAYNAQUCAQGHagEDDwQBCKQSjARTgwmEMQoZJw1kiFURAQUMgR2LOhqCWgeCa4FHA5YngWuBL4UQhhaDTEGEVA X-IPAS-Result: AkYDAAJMi1LRVdYslWdsb2JhbABZgz+DSbxJgR8WDgEBAQEHDQkJEiqCJQEBBSMECwENARscAQEDDAYFCw0CAgUWCwICCQMCAQIBDwIRAQUBHAYNAQUCAQGHagEDDwQBCKQSjARTgwmEMQoZJw1kiFURAQUMgR2LOhqCWgeCa4FHA5YngWuBL4UQhhaDTEGEVA X-IronPort-AV: E=Sophos;i="4.93,729,1378850400"; d="scan'208";a="43761249" Received: from mail-bk0-f44.google.com ([209.85.214.44]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 19 Nov 2013 12:34:48 +0100 Received: by mail-bk0-f44.google.com with SMTP id d7so3007846bkh.31 for ; Tue, 19 Nov 2013 03:34:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=nYp2WfsLFA837Cp2ztqT1WmHGup2kq4tmwWoVx3nmXQ=; b=AUpR5ZLA1maUQhkfhz9GDy4tH6p3GsOFSqFMNF08sV/UzM9C/Zxy4sUp8TEYUH23jq cnQtNsMe2h2Vs9oHTS+6Qe40u7szqEN3umjYCc0tDGxHlkzwe44e+mDB3ngifI0cAXNt lecZeWEtZEwStHjEAu/qpMLHsZd4x8OlzDaSGPWb9rbmvMnQBcXEa8v79eDvAES10DWi u2yFZiFZNYpt+okea3GOA4+c7JnTpROmOfqEWk5+Xd9F/QIPld9hm5UlZipsP+7kN/tt uBCtICLPafHTfKyfYyP8+l6K1tkE9fXCBnB6dttpPfvQ60hrGDHlenJcl2DFIoM90b6C XQig== X-Received: by 10.204.226.135 with SMTP id iw7mr16185747bkb.4.1384860888105; Tue, 19 Nov 2013 03:34:48 -0800 (PST) Received: from [192.168.1.30] (AMontsouris-652-1-7-170.w92-163.abo.wanadoo.fr. [92.163.30.170]) by mx.google.com with ESMTPSA id j6sm9475091bki.17.2013.11.19.03.34.46 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 19 Nov 2013 03:34:47 -0800 (PST) Message-ID: <528B4CF7.7080808@gmail.com> Date: Tue, 19 Nov 2013 12:35:19 +0100 From: Jacques-Pascal Deplaix User-Agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: =?UTF-8?B?UmFwaGHDq2wgUHJvdXN0?= CC: OCaml Mailing List References: <8738mthu88.fsf@golf.niidar.ru> <528B463A.5080303@gmail.com> In-Reply-To: X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: Re: [Caml-list] lwt exceptions and infinite loops Oh ok, I didn't know that, thanks. On 11/19/2013 12:11 PM, Raphaƫl Proust wrote: > On Tue, Nov 19, 2013 at 11:06 AM, Jacques-Pascal Deplaix > wrote: >> Where did you find the operator (>>) ? Your function loop doesn't >> terminate because (>>) evaluates both arguments. > Lwt's syntax extensions provides (>>) as sugar for `>>= fun () ->`. > > http://ocsigen.org/lwt/api/Pa_lwt > > >> On 11/19/2013 05:48 AM, Ivan Gotovchits wrote: >>> consider the following simple example: >>> >>> open Lwt >>> let rec loop () = Lwt_unix.sleep 1. >> loop () >>> let bad () = Lwt_unix.sleep 1. >> fail Not_found >>> let () = Lwt_main.run (join [loop (); bad ()]) >>> >>> >>> This program never terminates with an exception as I expect. >>> >>> Can someone clarify to me what really happens underneath the hood? >>> >>> Thanks in advance! >>> > >