- Learning Concurrency in Kotlin
- Miguel Angel Castiblanco Torres
- 223字
- 2021-08-05 10:46:43
Livelocks
Livelocks are similar to deadlocks, in the sense that they also happen when the application can't correctly continue its execution. The difference is that during a livelock the state of the application is constantly changing, but the state changes in a way that further prevents the application from resuming normal execution.
Commonly, a livelock is explained by picturing two people, Elijah and Susan, walking in opposite directions in a narrow corridor. Both of them try to avoid the other by moving to one side: Elijah moves to the left while Susan moves to the right, but since they are walking in opposite directions, they are now blocking each other's way. So, now Elijah moves to the right, just at the same time that Susan moves to the left: once again they are unable to continue on their way. They continue moving like this, and thus they continue to block each other:

In this example, both Elijah and Susan have an idea of how to recover from a deadlock—each blocking the other—but the timing of their attempts to recover further obstructs their progress.
As expected, livelocks often happen in algorithms designed to recover from a deadlock. By trying to recover from the deadlock, they may in turn create a livelock.
- HornetQ Messaging Developer’s Guide
- Vue.js 2 and Bootstrap 4 Web Development
- 云計算通俗講義(第3版)
- JavaScript+Vue+React全程實例
- Scala編程實戰(原書第2版)
- Instant Lucene.NET
- 基于ARM Cortex-M4F內核的MSP432 MCU開發實踐
- Access 2010數據庫應用技術實驗指導與習題選解(第2版)
- ActionScript 3.0從入門到精通(視頻實戰版)
- Kotlin Programming By Example
- 用Go語言自制編譯器
- Tkinter GUI Programming by Example
- SQL Server 2014數據庫設計與開發教程(微課版)
- R語言編程基礎
- Java語言GUI程序設計