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)05/31 Report--
This article mainly introduces "what java thread lock refers to". In daily operation, I believe that many people have doubts about what Java thread lock refers to. Xiaobian consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful for you to answer the question of "what Java thread lock refers to"! Next, please follow the editor to study!
1. Description
Thread lock means that the waiting thread cannot progress because the conditions needed to wake it up can never be established, or because other threads are unable to wake up the thread and remain in a non-running state (the thread does not terminate).
2. There are two types of thread lock:
(1) signal loss lock: the signal loss lock is due to the fact that there is no corresponding notification thread to wake up the waiting thread, resulting in the waiting thread waiting all the time.
A typical example is that the waiting thread does not judge the protection condition before executing Object.wait () / Condition.await (), when the protection condition may actually be established, and then there may be no other thread updating the shared variables involved in the corresponding protection condition to make it set up and notify the waiting thread, which keeps the waiting thread in a waiting state, thus preventing its task from progressing.
(2) nested monitor lock: nested monitor lock is a fault that the waiting thread can never be awakened because of the nested lock.
For example, a thread releases only the inner lock Y.wait (), but not the outer lock X; but notifies the thread that it must obtain the outer lock X before it can wake up the waiting thread through Y.notifyAll (), which leads to the phenomenon of nested waiting.
What are the basic data types of java? the basic data types of Java are as follows:
1. Integer type, which is used to represent the data type of integer.
2. Floating point type, which is used to represent the data type of decimals.
3. Character type. The keyword of character type is "char".
4. Boolean type, which is the basic data type that represents logical values.
At this point, the study of "what java thread lock refers to" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
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.