cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bruno Dumon <br...@outerthought.org>
Subject RE: CommandManager again (was RE: [VOTE] Migrate from the aging ECM)
Date Wed, 03 Sep 2003 09:23:02 GMT
On Wed, 2003-09-03 at 11:05, Carsten Ziegeler wrote:
> Bruno Dumon wrote:
> > 
> > On Wed, 2003-09-03 at 10:23, Carsten Ziegeler wrote:
> > <snip/>
> > > I think we should do this switch asap. *If* we can solve the 
> > commandmanager
> > > issue discussed in the other thread, I will make a 2.1.1 
> > release this week.
> > 
> > The issue can in fact be fixed immediately by changing the way we use
> > the PooledExecutor class. In the TPCThreadManager class (in
> > excalibur-event), change the line:
> > 
> > m_threadPool.waitWhenBlocked();
> > 
> > to
> > 
> > m_threadPool.discardWhenBlocked();
> > 
> > functionally, this shouldn't change anything (I think), and it will
> > avoid the problem in PooledExecutor completely.

Before I forget: another solution is to use a keepalive time of -1:
m_threadPool.setKeepAliveTime(-1);
together with m_threadPool.waitWhenBlocked();

In that case threads will never expire (so the thread pool will have a
fixed size once it reached its maximum) which also avoids the problem.

I think using dicardWhenBlocked() is better though.

-- 
Bruno Dumon                             http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno@outerthought.org                          bruno@apache.org


Mime
View raw message