站内搜索: 请输入搜索关键词
当前页面: 图书首页 > Java Concurrency in Practice

Summary - Java Concurrency in Practice

Previous Page
Next Page

Summary

Liveness failures are a serious problem because there is no way to recover from them short of aborting the application. The most common form of liveness failure is lock-ordering deadlock. Avoiding lock ordering deadlock starts at design time: ensure that when threads acquire multiple locks, they do so in a consistent order. The best way to do this is by using open calls throughout your program. This greatly reduces the number of places where multiple locks are held at once, and makes it more obvious where those places are.


Previous Page
Next Page