[Java concurrent programming] 14. Thread, Thread description, javathread

Source: Internet
Author: User

[Java concurrent programming] 14. Thread, Thread description, javathread

Thread status: New, Runnable, Blocked, Waiting, Timed waiting, Terminated

1. RUNNABLE, corresponding to the "ready" and "running" statuses. That is to say, a Thread in the ready and running status is displayed as "RUNNABLE" in java. lang. Thread"
2. BLOCKED, corresponding to the "blocking" status. This thread needs to obtain a lock to continue execution, and this lock is currently held by other threads, so it enters the passive waiting status, it is not until the lock is obtained that it enters the "ready" status again.
3. WAITING, corresponding to the "blocking" status, indicates that the thread is WAITING for an indefinite period of time until someone wakes it up and it enters the ready state again.
4. TIMED_WAITING, corresponding to the "blocking" status, indicates that the thread is waiting for a certain period of time, or someone will wake it up, or wait for a certain amount of time before it enters the ready state again.

 

 

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.