Hi community,

I've just implemented a subclass of ThreadPoolExecutor that accepts
only IoEvents and IoFilterEvents and maintains the order of events by
itself (i.e. without any help of ExecutorFilter).

The result is impressive; UnorderedExecutorFilter +
OrderedThreadPoolFilter outperforms ExecutorFilter +
Executors.newFixedThreadPool() by apx 20% in my machine.

Please review the code:

http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/filter/executor/OrderedThreadPoolExecutor.java?view=markup

One limitation is that you cannot specify the Queue implementation.
Except that, I think I implemented all features of the
ThreadPoolExecutor.

So, what do you think about:

* Removing ExecutorFilter,
* merging AbstractExecutorFilter and UnorderedExecutorFilter into the
new ExecutorFilter
* and letting it use OrderedThreadPoolExecutor by default?

I think most users won't need to specify other executor than
OrderedThreadPoolExecutor and providing many convenience constructors
in ExecutorFilter will compensate the possible breakage of backward
compatibility.

If there's no objection, let me go ahead.

Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP Key ID: 0x0255ECA6

Reply via email to