一、什么是JUC?
JUC指的就是java.util.concurrent工具包的简称。里面的工具类可以很方便的实现多线程的开发。
二、进程和线程的概念
-
进程与线程
进程:指的是操作系统进行调度的基本单位,一个程序的运行就是一个进程。
线程:指的是处理器进行资源调度的基本单位,也是程序执行的最小单位,一个进程包括一个或多个线程。
-
线程的状态
-
1线程状态的枚举类Enum Thread.State
public enum State { /** * Thread state for a thread which has not yet started. */ NEW, /** * Thread state for a runnable thread. A thread in the runnable * state is executing in the Java virtual machine but it may * be waiting f
-