Peter, Actually, I've contributed before by proxy. And I did mention this some months ago, but be that as it may, here is the problem:
org.apache.avalon.cornerstone.blocks.threads.DefaultThreadManager.configureT hreadPool: final DefaultThreadPool threadPool = new DefaultThreadPool(name, maxThreads, threadContext); -------- org.apache.avalon.excalibur.thread.impl.DefaultThreadPool.DefaultThreadPool( String name, int capacity, ThreadContext context) m_underlyingPool = new SoftResourceLimitingPool( this, capacity ); -------- excalibur.pool.SoftResourceLimitingPool.SoftResourceLimitingPool(ObjectFacto ry factory, int min) this( factory, null, min, min * 2 ); -------- Note how maxThreads passed by configureThreadPool into DefaultThreadPool as the capacity became the min passed to SoftResourceLimitingPool. One problem is that DefaultThreadPool doesn't have a semantic for min. The int value "capacity" could be interpreted as either a min capacity or a max, and obviously there was a disconnect at some point. My own preference is that if you are going to discard something, discard my min, not my max. As for how you want to fix it, that's up to you. One way: public DefaultThreadPool( final String name, final int min, final int max, final ThreadContext context ) throws Exception { super( name ); m_underlyingPool = new SoftResourceLimitingPool( this, min, max ); m_pool = new BasicThreadPool( this, name, m_underlyingPool, context ); } threadPool = new DefaultThreadPool(name, minThreads, maxThreads, threadContext); That's two quick changes. --- Noel -----Original Message----- From: Peter Donald [mailto:[EMAIL PROTECTED]] Sent: Monday, December 09, 2002 3:09 To: Avalon Developers List Subject: Re: DO NOT REPLY [Bug 15060] - deadlock in ResourceLimitingPool On Mon, 9 Dec 2002 12:46, Noel J. Bergman wrote: > Peter, > > While you're working in the pooling code, do you think that you could fix > the pooling bug that causes the max to become the min, and the real max to > be twice the original? > > Trace the constructor calls. If you know what the problem is and where the problem is then it is a perfect opportunity for you to make your first contribution. Otherwise bugzilla it so it doesn't fall through the cracks. -- Cheers, -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>