xml-rpc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Rall <...@finemaltcoding.com>
Subject Re: Web server thread counting
Date Tue, 20 Aug 2002 16:51:57 GMT
"Rob Walker" <robw@softsell.com> writes:

> We have a scenario where the following line in WebServer.java throws 
> spurious errors:
> 
> 
>             if (runners.activeCount () > 255)
>             {
>                 throw new RuntimeException ("System overload");
>             }
> 
> 
> The problem with this occurs if any of the the xml/rpc service handlers create 
> threads themselves, then as it's parent, these will also end up in the 
> "runners" ThreadGroup unless the parent of the created thread is specifically 
> set differently.
> 
> Hence the above doesn't just count runner threads, but also all threads 
> which runner threads create. We can easily work around this in our code, by 
> setting the ThreadGroup before creating new threads - but the behaviour 
> seems wrong somehow.

Rob, I agree that the behavior you describe seems wrong.  I'm not
currently very knowledgeable about thread groups; would you mind
writing up patch (in unidiff format) to rectify the situation?
-- 

Daniel Rall <dlr@finemaltcoding.com>

Mime
View raw message