随笔分类 - 多线程
摘要:1.三种创建线程池的方式: Executors.newFixedThreadPool(5); Executors.newSingleThreadExecutor(); Executors.newCachedThreadPool(); 三者底层均是使用ThreadPoolExecutor实现的 2.T
阅读全文
摘要:# 1.简介 JUC自JDK1.5出现,为`java.util.concurrent`包的简称 ## 1.1.线程状态 线程状态枚举类:`Thread.State` ``` public enum State { NEW, RUNNABLE, BLOCKED, WAITING, // 持续等待 TI
阅读全文