Do not count a ChannelDownstreamEventRunnable

* MATPE is only for upstream events.
This commit is contained in:
Trustin Lee 2012-01-13 20:48:18 +09:00
parent fde6789f41
commit b9386e7be8

View File

@ -452,6 +452,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();