Re: How to make a responsive server?



Hi, Michael,

On Wed,  5 Feb 2003 23:33, you wrote:
> Hi Lars,
>
> On Mon, 2003-02-03 at 08:41, Lars Petersson wrote:
> > I have browsed through the archives and found out that ORBit2 is
> > not really thread-safe. It was also explained that in a process, there
> > must (currently) only be one thread that takes care of incoming and
> > outgoing messages. So my question is then, if we have a client that
> > asks the server to perform a heavy computation (takes a long time)
> > and return with the answer, how can we make the server still be
> > responsive to other clients that asks the server to do the same or other
> > things?
>
> 	There are several ways to do it; one easy one would be to scatter a few
> linc_main_iteration (FALSE)'s inside the slow method - of course, you
> have to be able to cope with the re-enterancy ramifications of that but
> you get that sort of thing anyway.

Ok, so there is a work-around if the time consuming part in your method
is under your control, i.e. you can add these lines of linc_main_iteration.
What if the time consuming part is within a library function that you can not
change?

/Lars



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]