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

Chapter 10.  Avoiding Liveness Hazards - Java Concurrency in Practice

Previous Page
Next Page

Chapter 10. Avoiding Liveness Hazards

There is often a tension between safety and liveness. We use locking to ensure thread safety, but indiscriminate use of locking can cause lock-ordering deadlocks. Similarly, we use thread pools and semaphores to bound resource consumption, but failure to understand the activities being bounded can cause resource deadlocks. Java applications do not recover from deadlock, so it is worthwhile to ensure that your design precludes the conditions that could cause it. This chapter explores some of the causes of liveness failures and what can be done to prevent them.


Previous Page
Next Page