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 DD0F47FF9F for ; Tue, 8 Mar 2016 14:04:08 +0100 (CET) IronPort-PHdr: 9a23:5wiCjhVSZunLBKntyMR/tudPl9jV8LGtZVwlr6E/grcLSJyIuqrYZhyFt8tkgFKBZ4jH8fUM07OQ6PC/HzxcqszR+Fk5M7VyFDY9wf0MmAIhBMPXQWbaF9XNKxIAIcJZSVV+9Gu6O0UGUOz3ZlnVv2HgpWVKQka3CwN5K6zPF5LIiIzvjqbpq8KVM1kD3mr1SIgxBSv1hD2ZjtMRj4pmJ/R54TryiVwMRd5rw3h1L0mYhRf265T41pdi9yNNp6BprJYYAu3SNp41Rr1ADTkgL3t9pIiy7UGCHkOz4S4tW38RlFJtAg7e7wCyCob0sy3htftV2iCcMNbqV705RXKp6KI9GzHyjyJSFTMj/WTWh4RcjadaphXp8x5zwovVZoa9NvN4c7jBZ94XWSxKWcMHBH8JOZ+1c4ZaV7lJBu1ftYSo4gJW9RY= Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=jdimino@janestreet.com; spf=Pass smtp.mailfrom=jdimino@janestreet.com; spf=None smtp.helo=postmaster@mxout1.mail.janestreet.com Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of jdimino@janestreet.com) identity=pra; client-ip=38.105.200.112; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="jdimino@janestreet.com"; x-sender="jdimino@janestreet.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of jdimino@janestreet.com designates 38.105.200.112 as permitted sender) identity=mailfrom; client-ip=38.105.200.112; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="jdimino@janestreet.com"; x-sender="jdimino@janestreet.com"; 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@mxout1.mail.janestreet.com) identity=helo; client-ip=38.105.200.112; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="jdimino@janestreet.com"; x-sender="postmaster@mxout1.mail.janestreet.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0AuAQBgzd5WknDIaSZchHkGulOBaYYPAoEzBzkTAQEBAQEBAQEQAQEBAQcWCVBBEgGBWYIVAQEDARIRHQEBNwEECwsEBwM0AgIiEgEFARwGEyKHeggDoSqBMT4xik9nhEEBBIpnAQEBAQEBBAEBAQEBAQEBEgYKhg2EPoc6gTqXL41ugWSHaYUujRgRHoEPIgKCNB6BUGqFEoRtAQEB X-IPAS-Result: A0AuAQBgzd5WknDIaSZchHkGulOBaYYPAoEzBzkTAQEBAQEBAQEQAQEBAQcWCVBBEgGBWYIVAQEDARIRHQEBNwEECwsEBwM0AgIiEgEFARwGEyKHeggDoSqBMT4xik9nhEEBBIpnAQEBAQEBBAEBAQEBAQEBEgYKhg2EPoc6gTqXL41ugWSHaYUujRgRHoEPIgKCNB6BUGqFEoRtAQEB X-IronPort-AV: E=Sophos;i="5.22,556,1449529200"; d="scan'208,217";a="167626217" Received: from mxout1.mail.janestreet.com ([38.105.200.112]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Mar 2016 14:03:52 +0100 Received: from tot-qpr-mailcore2.delacy.com ([172.27.56.106] helo=tot-qpr-mailcore2) by mxout1.mail.janestreet.com with esmtps (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.82) (envelope-from ) id 1adHIm-0002zf-2g for caml-list@inria.fr; Tue, 08 Mar 2016 08:03:52 -0500 X-JS-Flow: external Received: by tot-qpr-mailcore2 with JS-mailcore (0.1) (envelope-from ) id BW3s24-AAAEq1-BH; 2016-03-08 08:03:52.036768-05:00 Received: from mail-ig0-f174.google.com ([209.85.213.174]) by mxgoog2.mail.janestreet.com with esmtps (UNKNOWN:AES128-GCM-SHA256:128) (Exim 4.72) (envelope-from ) id 1adHIl-0001OO-Sm for caml-list@inria.fr; Tue, 08 Mar 2016 08:03:52 -0500 Received: by mail-ig0-f174.google.com with SMTP id ir4so74013552igb.1 for ; Tue, 08 Mar 2016 05:03:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc; bh=oWl7cg5CYdHJMZlzC5gjAuWzukaWd8lpVuCRYL4SOL0=; b=LyfDAZ3zzSLTwrA1bQK3d+NEsuR7Ugi/EQziXEETDFPrAyB7p7jjCLdsqvSddDBuMy fuKMsTcCsCrY/OOiKatZGx4Cu1NYvINuzx9F6Hn3qb4vgAp4o5v7vApjTqrYaqxd/5MB SXt6PVZABMs6WFFRbqwLQ0ejZDja/1Nwukr80= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=oWl7cg5CYdHJMZlzC5gjAuWzukaWd8lpVuCRYL4SOL0=; b=elXwnnlIdz+Pek/YcapYsC/w+s2O17JVOOiR5svpsCtp94zxlS3vFdbiZofR+dyM5x ZEGCmMTqCiBnTOSgjTUOgyk4G6dg5pc4gtrVwU4nfogkPwD0UC+P0r1auyXBCYIT/MSE bQxbmP68JgZKMkMKiLFMMs7GR6d/gJCEKv17fORl+sZU+19/ox9UoWSlOaXuEuT3MD5+ DJXl9sI3jh3M5WeVVDL++tUR4PxqwygVPeAa4BkqIlLNLcoxSTVbtsHfWNRKPhmxk6H2 RBq/h5m3G7WQv1Tq2d/2nTkis8ILnKoprOLPo7hxPokwoACeNjJ/IpqkUkGN9GciDLt3 4riw== X-Gm-Message-State: AD7BkJIbbt87nBGAIuifgMx7DkdAhetDs+UsPFcxOVu/lIcIuEpxB/fVdNVYvZk8rHFsy2rVSFW8DDONtw46KR/LK+S/RWJhzj5JEBJYiRprdkh0lStpOQmZojmegrE9SfFtol/JaREoNIesWxqb X-Received: by 10.50.110.5 with SMTP id hw5mr19708742igb.54.1457442231464; Tue, 08 Mar 2016 05:03:51 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.50.110.5 with SMTP id hw5mr19708733igb.54.1457442231368; Tue, 08 Mar 2016 05:03:51 -0800 (PST) Received: by 10.50.30.193 with HTTP; Tue, 8 Mar 2016 05:03:51 -0800 (PST) In-Reply-To: References: <86h9gi9msc.fsf@gmail.com> <86d1r69ho4.fsf@gmail.com> <868u1ta25r.fsf@gmail.com> Date: Tue, 8 Mar 2016 13:03:51 +0000 Message-ID: From:Jeremie Dimino To:Yaron Minsky Cc:Malcolm Matalka , Yotam Barnoy , Jesper Louis Andersen , Ocaml Mailing List Content-Type: multipart/alternative; boundary=089e0122a67e7b67e9052d893639 X-JS-Processed-by: mailcore Subject: Re: [Caml-list] Question about Lwt/Async --089e0122a67e7b67e9052d893639 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Tue, Mar 8, 2016 at 12:47 PM, Yaron Minsky wrote: > Jeremie, other than having some different back-ends available (e.g., glib > main loop), how different are the approaches to backend management between > Async and Lwt? > =E2=80=8BThe backend interfaces are slightly different=E2=80=8B, but we jus= t need a bit of glue in the middle. Essentially the difference is that with Lwt you provide one callback per fd and watch (read or write), while with Async you have a global callback. =E2=80=8BRight now what we need to change in Async to make this work is: - allow to provide a backend =E2=80=8Bprogrammatically; right now you can o= nly choose between the predefined epoll and select ones - make the scheduler ignore fds returned by the backend that are not handled by async --089e0122a67e7b67e9052d893639 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On Tue, Ma= r 8, 2016 at 12:47 PM, Yaron Minsky <yminsky@janestreet.com> wrote:
Jer= emie, other than having some different back-ends available (e.g., glib main= loop), how different are the approaches to backend management between Asyn= c and Lwt?

=E2=80=8BThe backend in= terfaces are slightly different=E2=80=8B, but we just need a bit of glue in= the middle. Essentially the difference is that with Lwt you provide one ca= llback per fd and watch (read or write), while with Async you have a global= callback.

=E2=80=8BRight now what we need to change= in Async to make this work is:

- allow to provide a b= ackend =E2=80=8Bprogrammatically; right now you can only choose between the= predefined epoll and select ones
- make the scheduler ignore fds= returned by the backend that are not handled by async
=C2= =A0
--089e0122a67e7b67e9052d893639--