From: Jake Donham <jake@donham.org>
To: OCaml List <caml-list@inria.fr>
Subject: Re: [Caml-list] ocamlnet: event queues
Date: Sat, 6 Nov 2010 21:01:48 -0700 [thread overview]
Message-ID: <AANLkTimUk-jEqYCZJkcH3c+BY8Z8p01khak8irykUJby@mail.gmail.com> (raw)
In-Reply-To: <4CD5D9F7.9050305@philou.ch>
[-- Attachment #1: Type: text/plain, Size: 836 bytes --]
On Sat, Nov 6, 2010 at 3:43 PM, Philippe Strauss <philou@philou.ch> 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
[...]
Unixqueue.run 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
http://projects.camlcity.org/projects/dl/ocamlnet-3.0.2/doc/html-main/Unixqueue.html
for more details.
Jake
[-- Attachment #2: Type: text/html, Size: 1520 bytes --]
prev parent reply other threads:[~2010-11-07 4:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-06 22:43 Philippe Strauss
2010-11-07 4:01 ` Jake Donham [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=AANLkTimUk-jEqYCZJkcH3c+BY8Z8p01khak8irykUJby@mail.gmail.com \
--to=jake@donham.org \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox