In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/03 Report--
1. New state (New): a new thread object is created.
2. Ready state (Runnable): after the thread object is created, other threads call the object's start () method. The thread in this state is in the runnable thread pool and becomes runnable, waiting to gain access to the CPU.
3. Running: the thread in the ready state gets the CPU and executes the program code.
4. Blocking state (Blocked): blocking state means that the thread gives up the right to use CPU for some reason and stops running temporarily. You don't have a chance to go to the running state until the thread is in a ready state. There are three types of congestion:
(1) waiting blocking: the running thread executes the wait () method, and JVM puts the thread in the waiting pool. (wait will release the lock held)
(2) synchronization blocking: when the running thread acquires the synchronization lock of the object, if the synchronization lock is occupied by another thread, JVM will put the thread into the lock pool.
(3) other blocking: when a running thread executes the sleep () or join () method, or when an Icano request is issued, JVM puts the thread in a blocking state. When the sleep () state times out, the join () waits for the thread to terminate or times out, or when IBG O has finished processing, the thread returns to the ready state. (note that sleep will not release held locks.)
5. Dead: the thread ends its life cycle when it finishes execution or exits the run () method because of an exception.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.