Version française
Home     About     Download     Resources     Contact us    
Browse thread
netplex multi-thread asynchronous processor for passive clients
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Serge Sivkov <ssp.mryau@g...>
Subject: Re: [Caml-list] netplex multi-thread asynchronous processor for passive clients
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?