caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Serge Sivkov <ssp.mryau@gmail.com>
To: Gerd Stolpmann <gerd@gerd-stolpmann.de>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] netplex multi-thread asynchronous processor for  passive clients
Date: Sat, 4 Apr 2009 20:24:18 +0600	[thread overview]
Message-ID: <c6c39ebb0904040724p1b8e3874n3fe4eb613dd92329@mail.gmail.com> (raw)
In-Reply-To: <c6c39ebb0904031055h7960e7fcs1d827f4c5ee92621@mail.gmail.com>

Hello,
why following code doesn't react to messages sent to container (and to
events sent from other service)?

exception BeLive
exception DataArrived
...
  method receive_admin_message container name args =
    container#event_system#add_event (Extra DataArrived)

...
  method process ~when_done container fd proto_name =
    let ch = Unix.out_channel_of_descr fd in
    let rec aux () =
      let s = (Sexp.to_string (sexp_of_msg dfl_msg)) ^ "\n" in
      output_string ch s;
      flush ch;
      Unix.sleep 1;
      container#event_system#add_event (Extra BeLive)
    in
    let cb _ _ = function
      | Extra DataArrived ->
        aux()
      | Extra BeLive ->
        Unix.sleep 1;
        container#event_system#add_event (Extra BeLive)
      | _ ->
        raise Equeue.Reject
    in
    let g = container#event_system#new_group() in
    container#event_system#add_handler g cb;
    aux ()

also, i'm interesting to answers to my previous qustion :) :
Does services started from one Netplex_main.startup are share same
event system for case
where their workload_manager sections in configuration file are identical?

How can i to know does some objects to share same event queue or doesn't?


  parent reply	other threads:[~2009-04-04 14:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-03 11:19 Serge Sivkov
2009-04-03 15:51 ` [Caml-list] " Gerd Stolpmann
2009-04-03 17:55   ` Serge Sivkov
2009-04-03 18:13     ` Jake Donham
2009-04-04 14:24     ` Serge Sivkov [this message]
2009-04-05 16:27       ` Serge Sivkov

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=c6c39ebb0904040724p1b8e3874n3fe4eb613dd92329@mail.gmail.com \
    --to=ssp.mryau@gmail.com \
    --cc=caml-list@yquem.inria.fr \
    --cc=gerd@gerd-stolpmann.de \
    /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;
as well as URLs for NNTP newsgroup(s).