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
ocamlnet: event queues
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2010-11-07 (04:02)
From: Jake Donham <jake@d...>
Subject: Re: [Caml-list] ocamlnet: event queues
On Sat, Nov 6, 2010 at 3:43 PM, Philippe Strauss <> wrote:

> still in my first cut at rpc, in my app I need to react on a file
> descriptor collectings logs for a child process, how do I transform
>    let esys = Unixqueue.standard_event_system () in

   [...] esys
> to something where I can add an fd to the poll/select, and know which fd
> has triggered one run of the loop?

If I understand you correctly, you just want to watch an additional file
descriptor and react when it becomes readable. You can do that by adding the
fd to the event system with Unixqueue.add_resource, then attaching a handler
for when the fd becomes readable with Unixqueue.add_handler. See the docs at

for more details.