美文网首页
线程池实现

线程池实现

作者: engineer_tang | 来源:发表于2022-12-12 10:53 被阅读0次
ThreadPoolExecutor pool= null;

        pool = new ThreadPoolExecutor(
                80,
                120,
                60,
                TimeUnit.SECONDS,
                new LinkedBlockingQueue<Runnable>(1000),
                new ThreadFactoryBuilder().setNameFormat("test-%d").build(),
                new ThreadPoolExecutor.CallerRunsPolicy());
         .allowCoreThreadTimeOut(true);

相关文章

网友评论

      本文标题:线程池实现

      本文链接:https://www.haomeiwen.com/subject/bfnqqdtx.html