Multithreading – what is the difference between deadlock prevention and deadlock prevention?
•
Java
I've heard of these two terms. Are they the same thing or different?
Solution
You can see:
Avoid: do not share resources between processes / multithreads
Precaution: use semaphores when sharing resources If multiple semaphores are locked, ensure that they are unlocked in the reverse locking order Always ensure that errors in critical sections are handled so that semaphores are released under all conditions
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码