Victor wrote:
One more question about "corePoolSize" and "maximumPoolSize" - are
they used in the same manner as in ThreadPoolExecutor?
The way the executor is created, those values are just passed to the
underlying java class. We don't do anything with those values inside
MINA code.
As I can see, OrderedThreadPoolExecutor overrides most of parent's
methods, even execute() and Worker.run(). That's why I ask.
yeah, it's a bit messy :/
When you look at this method :
/**
* Add a new thread to execute a task, if needed and possible.
* It depends on the current pool size. If it's full, we do nothing.
*/
private void addWorker() {
synchronized (workers) {
if (workers.size() >= super.getMaximumPoolSize()) {
return;
}
...
you see that the maximum pool size is the one stored in the inherited
class. But it does not make a lot of sense, as we create the worker
locally :/
Victor N
--
--
cordialement, regards,
Emmanuel Lécharny
www.iktek.com
directory.apache.org