From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 92730BC37 for ; Fri, 11 Dec 2009 13:16:40 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtMEAAvHIUvVuiYS/2dsb2JhbACEFJYLqxuQIgqBJYIqUgQ X-IronPort-AV: E=Sophos;i="4.47,382,1257116400"; d="scan'208";a="41815377" Received: from solaria.dimino.org ([213.186.38.18]) by mail1-smtp-roc.national.inria.fr with ESMTP; 11 Dec 2009 13:16:40 +0100 Received: from aurora (localhost.localdomain [127.0.0.1]) by solaria.dimino.org (Postfix) with ESMTP id E4ADB80048; Fri, 11 Dec 2009 13:16:39 +0100 (CET) Received: by aurora (Postfix, from userid 1000) id 815BA40901; Fri, 11 Dec 2009 13:16:38 +0100 (CET) Subject: Re: [Caml-list] Re: Recursion on React.events. From: =?ISO-8859-1?Q?J=E9r=E9mie?= Dimino To: guillaume.yziquel@citycable.ch Cc: OCaml List In-Reply-To: <4B21750F.9060707@citycable.ch> References: <4B1F0E3A.3040907@citycable.ch> <91a3da520912082353m5c75f307j6f9542877d84841f@mail.gmail.com> <20091209112316.GA15607@annexia.org> <4B1FE5E0.2020506@citycable.ch> <91a3da520912091938l4f81209ard2be25731ba9f593@mail.gmail.com> <4B21750F.9060707@citycable.ch> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Date: Fri, 11 Dec 2009 13:16:38 +0100 Message-ID: <1260533798.5029.97.camel@aurora> Mime-Version: 1.0 X-Mailer: Evolution 2.28.1 X-Spam: no; 0.00; recursion:01 0100,:01 guillaume:01 monadic:01 monadic:01 ocaml:01 computations:01 cembre:98 2009:98 avoids:01 caml-list:01 construct:02 seems:03 seems:03 reactive:04 Le jeudi 10 d=C3=A9cembre 2009 =C3=A0 23:24 +0100, Guillaume Yziquel a =C3= =A9crit : > Yes. It's also here where I worry about a few things concerning Lwt: >=20 > In Lwt, you have a monadic way to do context switches for multithreading=20 > withing a single real thread. So if you use Lwt inside the update cycle,=20 > you could well jump out of the update cycle with a Lwt context switch.=20 > As long as you do not encounter a Lwt construct within definition of=20 > signals and events, you can be pretty sure that the update cycle will go=20 > through to its end without using Lwt inside an event/signal. But at the=20 > same time, it seems that the monadic way Lwt is built avoids us such=20 > problems. But I may be mistaken. It is possible to use Lwt inside an update cycle. It is not a problem to switch context in an update cycle as long as you respect React's rules. > So the compatibility of Lwt and React seems to me a worthwile question=20 > if one wants to use OCaml for high availability, reactive, parallel=20 > computations. And in this context, making E/S.switch easy to use would=20 > quite important... Thanks to React being lowlevel, the two libraries are compatible out of the box. J=C3=A9r=C3=A9mie