|
| <prev next> |
Re: Questions about ThreadPoolExecutor and possible loss of 'command': msg#00043java.jsr.166-concurrency
Joshi, Rahul wrote:
One way to do it is to override beforeExecute and/or afterExecute to dynamically change core, max, or timeout settings. You can do something similar with a RejectedExecutionHandler. Our experience though is that either you want to unboundedly add threads (i.e., use a bounded queue but unbounded max) or unboundedly add queued tasks (i.e., use an unbounded queue and bounded max). Other combinations tend to be less well-behaved.
Notice that the code is in a loop, so it is not lost; instead everything is retried. -Doug
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | RE: Questions about ThreadPoolExecutor and possible loss of 'command', Joshi, Rahul |
|---|---|
| Previous by Thread: | RE: Questions about ThreadPoolExecutor and possible loss of 'command', Joshi, Rahul |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |