Do not count a ChannelDownstreamEventRunnable
* MATPE is only for upstream events.
This commit is contained in:
parent
fde6789f41
commit
b9386e7be8
|
@ -452,6 +452,10 @@ public class MemoryAwareThreadPoolExecutor extends ThreadPoolExecutor {
|
||||||
* make sure important tasks are not counted.
|
* make sure important tasks are not counted.
|
||||||
*/
|
*/
|
||||||
protected boolean shouldCount(Runnable task) {
|
protected boolean shouldCount(Runnable task) {
|
||||||
|
if (task instanceof ChannelDownstreamEventRunnable) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (task instanceof ChannelUpstreamEventRunnable) {
|
if (task instanceof ChannelUpstreamEventRunnable) {
|
||||||
ChannelUpstreamEventRunnable r = (ChannelUpstreamEventRunnable) task;
|
ChannelUpstreamEventRunnable r = (ChannelUpstreamEventRunnable) task;
|
||||||
ChannelEvent e = r.getEvent();
|
ChannelEvent e = r.getEvent();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user