geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alan Cabrera <Alan.Cabr...@reuters.com>
Subject RE: Thread pool strategy
Date Fri, 09 Jul 2004 16:23:28 GMT
Do you think it would be a good idea to allow someone to provide their
own thread pool manager for Geronimo?


Regards,
Alan

-----Original Message-----
From: David Jencks [mailto:david@coredevelopers.net] 
Sent: Thursday, July 08, 2004 6:24 PM
To: dev@geronimo.apache.org
Subject: Thread pool strategy

I've been working with the thread pools and PooledExecutor from 
concurrent a bit lately and understand how they work a little better 
than I used to:-)

I've changed the ThreadPool implementation to:

have a hard max size limit (and minSize == maxSize)
have a Queue that all waiting tasks are put on.
No task is ever executed in the calling thread.

I think this is the most appropriate policy for all thread pools in 
geronimo.  I'd be interested in other opinions... I don't consider 
myself an expert in this.

I'm not sure if the current implementation ever gets smaller, since the 
minsize == maxsize.  Having maxSize > minSize would involve writing a LinkedQueue subclass
that can communicate with the PooledExecutor to 
determine if the pool size < maxSize.  I'm reluctant to introduce this 
complication without evidence that it is needed.

Many thanks
david jencks





-----------------------------------------------------------------
        Visit our Internet site at http://www.reuters.com

Get closer to the financial markets with Reuters Messaging - for more
information and to register, visit http://www.reuters.com/messaging

Any views expressed in this message are those of  the  individual
sender,  except  where  the sender specifically states them to be
the views of Reuters Ltd.


Mime
View raw message