In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-14 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.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.