|
RE: Questions about ThreadPoolExecutor and possible loss of 'command': msg#00042java.jsr.166-concurrency
Hi, Thanks for a prompt reply. I guess my first question was not very clear. As an application developer, I would like to take advantage of the coreSize, maxSize as well as thread idle timeout. I would like to see a thread pool which grows up to maxSize on a load and shrinks to coreSize on minimum / no load conditions. This way I can utilize the pool to the maximum extend in the load conditions. As 'addIfUnderMaximumPoolSize' is private I can not overload 'execute' method. How do I implement the pool as explained above. Also can you answer my second query about possible loss of 'command'? Thanks, Rahul -----Original Message----- From: Doug Lea [mailto:dl@xxxxxxxxxxxxx] Sent: Monday, February 28, 2005 11:27 AM To: Joshi, Rahul Cc: concurrency-interest@xxxxxxxxxxxxxxxxxxxx Subject: Re: [concurrency-interest] Questions about ThreadPoolExecutor and possible loss of 'command' > Typically an application will like to use max threads and if all max > threads are busy then queue task (in unbounded queue) instead of > rejecting it. > Can I get such behavior from ThreadPoolExecutor? That's what Executors.newFixedThreadPool gives you. Sorry you found the terminology of core vs max threads confusing. It's the best we could come up with. -Doug
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Questions about ThreadPoolExecutor and possible loss of 'command', Doug Lea |
|---|---|
| Next by Date: | Re: Questions about ThreadPoolExecutor and possible loss of 'command', Doug Lea |
| Previous by Thread: | Re: Questions about ThreadPoolExecutor and possible loss of 'command', Doug Lea |
| Next by Thread: | Re: Questions about ThreadPoolExecutor and possible loss of 'command', Doug Lea |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |