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 mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id AD6B17EE25 for ; Tue, 19 Nov 2013 13:33:15 +0100 (CET) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of ivg@ieee.org) identity=pra; client-ip=209.85.215.52; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="ivg@ieee.org"; x-sender="ivg@ieee.org"; x-conformance=sidf_compatible Received-SPF: PermError (mail3-smtp-sop.national.inria.fr: cannot correctly interpret sender authenticity information from domain of ivg@ieee.org) identity=mailfrom; client-ip=209.85.215.52; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="ivg@ieee.org"; x-sender="ivg@ieee.org"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-la0-f52.google.com) identity=helo; client-ip=209.85.215.52; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="ivg@ieee.org"; x-sender="postmaster@mail-la0-f52.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkQDANZZi1LRVdc0lWdsb2JhbABZhwi8SYEfFg4BAQEBBw0JCRIqgiUBAQQBI1YFCwsOCgICBSECAg8BBCABBQEiE4d7BgQBpCaMBJI5gSmNezMHgmuBRwOJPI5WkCFBhFg X-IPAS-Result: AkQDANZZi1LRVdc0lWdsb2JhbABZhwi8SYEfFg4BAQEBBw0JCRIqgiUBAQQBI1YFCwsOCgICBSECAg8BBCABBQEiE4d7BgQBpCaMBJI5gSmNezMHgmuBRwOJPI5WkCFBhFg X-IronPort-AV: E=Sophos;i="4.93,729,1378850400"; d="scan'208";a="36451905" Received: from mail-la0-f52.google.com ([209.85.215.52]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 19 Nov 2013 13:33:14 +0100 Received: by mail-la0-f52.google.com with SMTP id ev20so5977849lab.39 for ; Tue, 19 Nov 2013 04:33:13 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-type :content-transfer-encoding; bh=hsfyjicYswi1bcZF2oMZdCczHbe8I4KM6n61xbZIN3A=; b=M3yRMio/wYiFc+yMXKAxJOPrQWkrThaSEu4hOdSLU6Rj/fA7vNb48swYPRQUP52cfm +WdqbokWMEqKMSS6Q71uL/hgy6GCwOSlfR7syp7UH43Ny7BUkxvUBteXLFOWUyB+bqZK 9RWcBaPBxZO4oVQ0FDU2vHPwNY5ox768H7czFg967jpcOKxVYb3HRvGbGqpKWukpJEb0 HYqHsuwevnJzbhOwGUGWMEzuVuZ6/0HgbHPZLVreSU/YNu+WHN9crigjQhVlBUVSft/T QGJghArjqKPha8G6y9Ft845I/T+JglguXvAbjg+ZW9YSu0QABLYhMUU+kAsQFFDNLwwJ 2OCQ== X-Gm-Message-State: ALoCoQm105PiPHvVJnTtnafdx/iNaYxsGiQq8Sh9y+ATZIeTe/il/k3hrNZ1KeXP/madUh81dSof X-Received: by 10.152.120.73 with SMTP id la9mr18588722lab.3.1384864393800; Tue, 19 Nov 2013 04:33:13 -0800 (PST) Received: from golf.niidar.ru.niidar.ru ([109.188.127.34]) by mx.google.com with ESMTPSA id qj3sm15733698lbb.1.2013.11.19.04.33.13 for (version=TLSv1.1 cipher=RC4-SHA bits=128/128); Tue, 19 Nov 2013 04:33:13 -0800 (PST) From: Ivan Gotovchits To: Jeremie Dimino Cc: "caml-list\@inria.fr" References: <8738mthu88.fsf@golf.niidar.ru> Date: Tue, 19 Nov 2013 16:32:58 +0400 In-Reply-To: (Jeremie Dimino's message of "Tue, 19 Nov 2013 09:21:48 +0000") Message-ID: <87y54kh8qt.fsf@golf.niidar.ru> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Caml-list] lwt exceptions and infinite loops Jeremie Dimino writes: > On Tue, Nov 19, 2013 at 4:48 AM, Ivan Gotovchits wrote: > > consider the following simple example: >=20=20=20=20 > =C2=A0 open Lwt > =C2=A0 let rec loop () =3D Lwt_unix.sleep 1. >> loop () > =C2=A0 let bad () =3D Lwt_unix.sleep 1. >> fail Not_found > =C2=A0 let () =3D Lwt_main.run (join [loop (); bad ()]) > > This program never terminates with an exception as I expect. >=20=20=20=20 > Can someone clarify to me what really happens underneath the hood? > > Lwt.join waits for all thread to terminate (with a value or an exception)= . In this case [loop ()] is still running so the join doesn't > terminate. > > --=C2=A0 > Jeremie > Ahh, it seems that I misunderstood the phrase: =C2=ABIf one of the threads fails, then [join l] will fail with the same exception as the first one to terminate.=C2=BB Thanks alot! --=20 (__)=20 (oo)=20 /------\/=20 / | ||=20=20=20 * /\---/\=20 ~~ ~~=20=20=20 ...."Have you mooed today?"...