Do not count a ChannelDownstreamEventRunnable

* MATPE is only for upstream events.
This commit is contained in:
Trustin Lee 2012-01-13 20:47:13 +09:00
parent 9c4cd3702f
commit 968ed8b53e

View File

@ -471,6 +471,10 @@ public class MemoryAwareThreadPoolExecutor extends ThreadPoolExecutor {
* make sure important tasks are not counted.
*/
protected boolean shouldCount(Runnable task) {
if (task instanceof ChannelDownstreamEventRunnable) {
return false;
}
if (task instanceof ChannelUpstreamEventRunnable) {
ChannelUpstreamEventRunnable r = (ChannelUpstreamEventRunnable) task;
ChannelEvent e = r.getEvent();