Boost logo

Boost :

From: Christopher Kohlhoff (chris_at_[hidden])
Date: 2005-08-27 03:02:50


Hi Felipe,

--- Felipe Magno de Almeida <felipe.m.almeida_at_[hidden]> wrote:
> I think it would be interesting to have some kind of "QoS". A way to
> give different priorities to handles/operations. I think it would be
> possible through more than one impl_reactor.

I presume you mean like in realtime systems, perhaps with an API using
concepts similar to RTCORBA?

I had thought before that something like this might be accomplished
through having multiple demuxers where each is assigned a priority and
each has its own pool of threads, e.g.

  rt_demuxer d1(high_priority);
  rt_demuxer d2(low_priority);
  rt_stream_socket s1(d1); // high priority socket
  rt_stream_socket s2(d2); // low priority socket
  ...
  thread th1(bind(&rt_demuxer::run, &d1));
  thread th2(bind(&rt_demuxer::run, &d2));

Or another approach having a single parent demuxer, with multiple child
demuxers, each assigned different priorities, but they all share the
parent demuxer's pool of threads (I believe this is more like what
RTCORBA does):

  rt_demuxer d;
  rt_child_demuxer d1(d, high_priority);
  rt_child_demuxer d2(d, low_priority);
  rt_stream_socket s1(d1); // high priority socket
  rt_stream_socket s2(d2); // low priority socket
  ...
  thread th1(bind(&rt_demuxer::run, &d));
  thread th2(bind(&rt_demuxer::run, &d));

However I am definitely *not* an expert in anything realtime, so this
is just a very rough idea of how I think it might be accomplished.

Cheers,
Chris


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk