《Scalable IO in Java》学习笔记--- Worker Thread Pools

代码大部分和Basic Reactor Design一样,只是handler中对读写进行了多线程处理 ExecutorService pool = Executors.newCachedThreadPool();新建一个线程池 pool.execute(new readProcesser());//线程池运行读线程 pool.execute(new sendProcesser());//线程池运行
相关文章
相关标签/搜索