caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Jacques-Pascal Deplaix <jp.deplaix@gmail.com>
To: caml-list@inria.fr
Subject: Re: [Caml-list] lwt exceptions and infinite loops
Date: Tue, 19 Nov 2013 12:06:34 +0100	[thread overview]
Message-ID: <528B463A.5080303@gmail.com> (raw)
In-Reply-To: <8738mthu88.fsf@golf.niidar.ru>

Where did you find the operator (>>) ? Your function loop doesn't
terminate because (>>) evaluates both arguments.

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!
>
>


  parent reply	other threads:[~2013-11-19 11:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-19  4:48 Ivan Gotovchits
2013-11-19  9:21 ` Jeremie Dimino
2013-11-19 12:32   ` Ivan Gotovchits
2013-11-19 11:06 ` Jacques-Pascal Deplaix [this message]
2013-11-19 11:11   ` Raphaël Proust
2013-11-19 11:35     ` Jacques-Pascal Deplaix

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=528B463A.5080303@gmail.com \
    --to=jp.deplaix@gmail.com \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).