Java Thread State

Source: Internet
Author: User

From java.lang.Thread.State you can see that the Java thread has the following status:

    • NEW
          A thread that have not yet started are in this St Ate.

    • RUNNABLE
          A thread executing in the Java virtual machine was in this state.

    • BLOCKED
          A thread that's BLOCKED waiting for a monitor lock     are in this State.

    • waiting
          A thread that's waiting indefinitely for another thread to     PE Rform a particular action is in this state.

    • timed_waiting
          A thread that's waiting for another thread to perform an action   ;   for up to a specified waiting time was in this state.

    • TERMINATED
          A thread that have exited is in the this state.

These states is virtual machine States which don't reflect any operating system thread states.

The operating system-defined thread states are:

New, ready, blocked, run, dead.

The Java thread state blocked,waiting,timed--waiting corresponds to the blocking state of the operating system thread.

Transition of thread state

650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M02/8D/DA/wKioL1itFVHjRGsjAAKq1sll9m4745.png "title=" Screenshot from 2017-02-22 12-36-15.png "alt=" Wkiol1itfvhjrgsjaakq1sll9m4745.png "/>

Java Thread State

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.