netty中OrderedMemoryAwareThreadPoolExecutor和MemoryAwareThreadPoolExecutor的区别

Difference between OrderedMemoryAwareThreadPoolExecutor and MemoryAwareThreadPoolExecutor in netty

在编写 netty 应用程序时,我不确定我的管道处理程序应该使用哪个线程池。

或者我应该选择

// OrderedMemoryAwareThreadPoolExecutor impl
    OrderedMemoryAwareThreadPoolExecutor pipelineExecutor = new OrderedMemoryAwareThreadPoolExecutor(
            200, 1048576, 1073741824, 100, TimeUnit.MILLISECONDS,
            new NioDataSizeEstimator(), new NioThreadFactory("NioPipeline"));

 ThreadPoolExecutor pool = new MemoryAwareThreadPoolExecutor(
     16, 65536, 1048576, 30, TimeUnit.SECONDS,
     new MyObjectSizeEstimator(),
     Executors.defaultThreadFactory());

不确定两者之间的区别。

如有任何帮助,我们将不胜感激。

我认为从 javadocs 开始已经很清楚了。 OrderedMemoryAwareThreadPoolExecutor 将确保事件在 "order" 中执行,而 MemoryAwareThreadPoolExecutor 则不会。