From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id p9RJB0Od022412 for ; Thu, 27 Oct 2011 21:11:00 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkgBAEmsqU7RVdK2mGdsb2JhbABDhHekYQgiAQEBAQEICQ0HFCWBcgEBAQMBEgIPHQEbHQEDAQsGBQsDDAImAgIiAREBBQEcBjWHYJdyCosMR4JghSQ9iHACBQqBJoY6gRQElA2NMz2ECw X-IronPort-AV: E=Sophos;i="4.69,414,1315173600"; d="scan'208";a="115162041" Received: from mail-iy0-f182.google.com ([209.85.210.182]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 27 Oct 2011 21:10:57 +0200 Received: by iaky10 with SMTP id y10so6285238iak.27 for ; Thu, 27 Oct 2011 12:10:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=MSPkugaSiGrWk1B9Nh1ftqM3PRGEMCCjPT9gvCr5BsM=; b=HjVPvNM9lGsxfOuErzmfuOqAqBJUV3pLmmM3XB0xI8gutf6DdRsoh89UDIG0mW+8o0 v6NvoTY8sfDNDQIdz+XHv3UpYill2m/O9vkWs+3yQiCf7u3Q5Yn9GiH3eGvjDmAUoJsy oml21BFNmy2tg4jD/ANWZKzZ6Ut1OoF0wjb0I= MIME-Version: 1.0 Received: by 10.231.74.77 with SMTP id t13mr473272ibj.84.1319742656566; Thu, 27 Oct 2011 12:10:56 -0700 (PDT) Received: by 10.231.205.135 with HTTP; Thu, 27 Oct 2011 12:10:56 -0700 (PDT) In-Reply-To: <1319740447.18639.220.camel@thinkpad> References: <1319614400.18639.148.camel@thinkpad> <1319632284.18639.181.camel@thinkpad> <1319740447.18639.220.camel@thinkpad> Date: Thu, 27 Oct 2011 15:10:56 -0400 Message-ID: From: =?UTF-8?Q?Milan_Stanojevi=C4=87?= To: Gerd Stolpmann Cc: yminsky@gmail.com, caml-list@inria.fr Content-Type: text/plain; charset=UTF-8 Subject: Re: [Caml-list] [ANN] Async, a monadic concurrency library > You probably mean the case where x has already computed a result. Yes. > > When developing Uq_engines, I was a bit unsure how to treat this case. > In the initial version, I just disallowed this case: There was simply no > way to run into it. If you wanted to create a thread that just yields a In Async and Lwt I think it quite possible to have this case even if x was not just giving you a constant value. For example, x could be read_char (), and if you have buffered input (like Async does, and probably Lwt) it is quite possible that read_char will be determined immediately (since there is no need to issue a system call)