Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Asynchronous IO programming in OCaml
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Goswin von Brederlow <goswin-v-b@w...>
Subject: Re: [Caml-list] Asynchronous IO programming in OCaml
Jérémie Dimino <> writes:

> On Sun, Oct 24, 2010 at 01:54:50PM -0700, Anil Madhavapeddy wrote:
>>    Async disk I/O under Linux is annoyingly problematic if you aren't using
>>    direct I/O (and hence page/block-aligned structures). Avoid if possible :)
> The next version of Lwt will support asynchronous disk I/O by using
> mincore + mmap. It is already in the development version.
> Jérémie

Doesn't that mean you have to do polling of all pending I/O? That seems
horrible ineficient (you check them all every time) or slow I/Os can
starve quick ones (you only check the oldest ones).

The nice thing about libaio is that you get events as I/O completes and
you get many events in one simple syscall. Doing thousands of I/O
requests in parallel is trivial there.