Return-Path: Delivered-To: apmail-geronimo-dev-archive@www.apache.org Received: (qmail 56123 invoked from network); 9 Jul 2004 16:47:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 9 Jul 2004 16:47:41 -0000 Received: (qmail 77714 invoked by uid 500); 9 Jul 2004 16:47:31 -0000 Delivered-To: apmail-geronimo-dev-archive@geronimo.apache.org Received: (qmail 77647 invoked by uid 500); 9 Jul 2004 16:47:31 -0000 Mailing-List: contact dev-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: dev@geronimo.apache.org Delivered-To: mailing list dev@geronimo.apache.org Received: (qmail 77615 invoked by uid 99); 9 Jul 2004 16:47:30 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [216.193.202.245] (HELO waseda.lunarpages.com) (216.193.202.245) by apache.org (qpsmtpd/0.27.1) with ESMTP; Fri, 09 Jul 2004 09:47:27 -0700 Received: from 000d88870c4e.click-network.com ([131.191.32.112] helo=crackwillow.michael@michaelmcgrady.com) by waseda.lunarpages.com with asmtp (Exim 4.34) id 1BiyX0-0002rV-Ep for dev@geronimo.apache.org; Fri, 09 Jul 2004 09:47:26 -0700 Message-Id: <6.1.2.0.0.20040709094403.01dffb00@michaelmcgrady.com> X-Sender: michael@michaelmcgrady.com@michaelmcgrady.com X-Mailer: QUALCOMM Windows Eudora Version 6.1.2.0 Date: Fri, 09 Jul 2004 09:47:24 -0700 To: dev@geronimo.apache.org From: michael Subject: RE: Thread pool strategy In-Reply-To: References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - waseda.lunarpages.com X-AntiAbuse: Original Domain - geronimo.apache.org X-AntiAbuse: Originator/Caller UID/GID - [0 0] / [47 12] X-AntiAbuse: Sender Address Domain - michaelmcgrady.com X-Source: X-Source-Args: X-Source-Dir: X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N At 09:23 AM 7/9/2004, you wrote: >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 I would suggest asking Doug Lea about this. He inexplicably seems to always have time to be helpful in this area, where he is the GooRoo. http://gee.cs.oswego.edu/dl/ I think this thread pool via PooledExecutor thing is the best thing since sliced bread. I use it whenever it is possible on my sites and have a standard mechanism for running tasks through this sort of implementation whenever it makes any sense whatsoever. I don't know enough about geronimo to be much help to you here, however. I don't quite know how to get involved with the list. That has been a standard problem with me and lists which I am trying to solve. Michael