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 p9S7Tnng017457 for ; Fri, 28 Oct 2011 09:29:49 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AlgBAA1Zqk7U4xEIkWdsb2JhbABChHekZiIBAQEBCQsLBxQDIoFyAQEFI1YQCxoCJgICVwYTCYd7BqMOkWKBMIY/gRQEjFCMaow0 X-IronPort-AV: E=Sophos;i="4.69,417,1315173600"; d="scan'208";a="126678428" Received: from moutng.kundenserver.de ([212.227.17.8]) by mail1-smtp-roc.national.inria.fr with ESMTP; 28 Oct 2011 09:29:44 +0200 Received: from office1.lan.sumadev.de (dslb-084-059-073-148.pools.arcor-ip.net [84.59.73.148]) by mrelayeu.kundenserver.de (node=mrbap0) with ESMTP (Nemesis) id 0LvPmd-1Qt7XZ3NyN-0100zx; Fri, 28 Oct 2011 09:29:43 +0200 Received: from [192.168.5.106] (dslb-084-059-073-148.pools.arcor-ip.net [84.59.73.148]) by office1.lan.sumadev.de (Postfix) with ESMTPSA id 6D757C00C7; Fri, 28 Oct 2011 09:29:42 +0200 (CEST) From: Gerd Stolpmann To: Milan =?UTF-8?Q?Stanojevi=C4=87?= Cc: yminsky@gmail.com, caml-list@inria.fr In-Reply-To: References: <1319614400.18639.148.camel@thinkpad> <1319632284.18639.181.camel@thinkpad> <1319740447.18639.220.camel@thinkpad> Content-Type: text/plain; charset="UTF-8" Date: Fri, 28 Oct 2011 09:29:42 +0200 Message-ID: <1319786982.18639.225.camel@thinkpad> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 X-Provags-ID: V02:K0:/hRsOfs8rIclfZJHQX9HKLJA/ZSODcJV8WzepncrHGe LDKDDcARZKpUliwWNcZeTBQZr4T8CmHSje6KP0BRxPEcWEet4Q 0fWu0pOKfsv79HybOaRsN6T6gsZDoEVAsBgWfujQBcw6DEEN1e ptqgwMPYaQK8S7LI3eqRxKfthXuChRDHJ+mrITXjcHKJ25HBBT dCpSv5pwTSg/ur+D9HPr4yzS/Km8Dnh+Z3Y2fathJ9m4xbZlRH UreuCW1syszrIE7AvEh/BEcPmrKHidYJ1nrlOj9c61z+nGU0yb Y/bdGaCSeHz2DCGtS4jVGMVhu+4WMMb4/OPxWak9RNSJS8dJum ikdQQphs37j2IjNtpoe4ULObxdq3KR0V93ccZLUCV Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by walapai.inria.fr id p9S7Tnng017457 Subject: Re: [Caml-list] [ANN] Async, a monadic concurrency library Am Donnerstag, den 27.10.2011, 15:10 -0400 schrieb Milan Stanojević: > > 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) Right, if functions like read_char are considered as primitives, you can have that. In Equeue e.g. Uq_io.really_input_e isn't a primitive, but just something built on top of input_e, and if it reads from the buffer, the value is returned via eps_e. So, it depends a bit on the design which functions show this phenomenon. Gerd -- ------------------------------------------------------------ Gerd Stolpmann, Darmstadt, Germany gerd@gerd-stolpmann.de Creator of GODI and camlcity.org. Contact details: http://www.camlcity.org/contact.html Company homepage: http://www.gerd-stolpmann.de *** Searching for new projects! Need consulting for system *** programming in Ocaml? Gerd Stolpmann can help you. ------------------------------------------------------------