zoukankan      html  css  js  c++  java
  • 线程状态

    NEW(A thread that has not yet started is in this state.)
    尚未启动的线程处于此状态。 Thread t = new Thread ();

    RUNNABLE (A thread executing in the Java virtual machine is in this state.)
    在Java虚拟机中执行的线程处于此状态。 new Thread().start();

    BLOCKED (A thread that is blocked waiting for a monitor lock is in this state.)
    被阻塞等待监视器锁定的线程处于此状态。 synchronized(this) -> while (flag)->obj.wait();

    WAITING (A thread that is waiting indefinitely for another thread to perform a particular action is in this state.)
    正在等待另一个线程执行特定动作的线程处于此状态。 Object.wait Thread.join LockSupport.park

    TIMED_WAITING (A thread that is waiting for another thread to perform an action for up to a specified waiting time is in this state.)
    正在等待另一个线程执行动作达到指定等待时间的线程处于此状态。 Thread.sleep Object.wait(timeout) Thread.join(timeout) LockSupport.parkNanos LockSupport.parkUntil

    TERMINATED (A thread that has exited is in this state.)
    已退出的线程处于此状态。

  • 相关阅读:
    vue报错 error: data.push is not a function
    vue elment.style样式修改(第三方组件自生成元素)
    按元素标签查询多个
    按css查询多个元素
    按CSS查询一个元素
    查询单个元素
    JavaScript 查找元素
    Spring 商品分类
    Spring 使用日志
    Spring 使用日期类型
  • 原文地址:https://www.cnblogs.com/sleepingDogs/p/11024963.html
Copyright © 2011-2022 走看看