"Java concurrency Programming" 14, Thread, threading description

Source: Internet
Author: User

Status of Threads: New, Runnable, Blocked, waiting, Timed waiting, Terminated

1. RUNNABLE, corresponding to the "Ready" and "running" states, that is, in the ready and running state of the thread in the Java.lang.Thread is displayed as "RUNNABLE"
2. BLOCKED, corresponding to the "blocking" state, this thread needs to obtain a lock to continue execution, and this lock is currently held by other threads, so entered a passive wait state, until the lock was grabbed, will again enter the "Ready" state
3. Waiting, which corresponds to a "blocking" state, indicates that the thread is in an indefinite active wait until it is awakened by someone, and it will again enter the ready state
4. Timed_waiting, which corresponds to a "blocking" state, means that the thread is in an active wait with a deadline, or someone wakes it up or waits for a certain amount of time before it gets ready again

"Java concurrency Programming" 14, Thread, threading description

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.