From e8750009fc00136e736b4286cf842d25ac059e16 Mon Sep 17 00:00:00 2001 From: Sander Hautvast Date: Mon, 23 Sep 2019 12:39:22 +0200 Subject: [PATCH] minor update --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 1655e3a..df9c65c 100644 --- a/readme.md +++ b/readme.md @@ -79,4 +79,4 @@ This code shows the many ways you historically have to make the thread stop for - [`CustomThreadPoolExecutor`](src/chapter8/CustomThreadPoolExecutor.java) Executors can be extended using provided hooks. This code (inspired by listing 8.9) shows how to capture task execution times. ## chapter 10 Avoiding Liveness Hazards -- [`Bank`](src/chapter10/Bank.java) Proves the point made in listing 10.2 concerning deadlock due to dynamic lock-reordering. The from account and to account will very likely be the same (but reversed) in 2 different threads. Locking on the accounts must always happen in the same order to avoid deadlock. The cure for this is in the book in listing 10.3. \ No newline at end of file +- [`Bank`](src/chapter10/Bank.java) Proves the point made in listing 10.2 concerning deadlock due to dynamic lock-reordering. The from account and to account will very likely be the same (but reversed) in 2 different threads. Locking on the accounts must always happen in the same order to avoid deadlock. The cure for this is in the book in listing 10.3. This code will at some point stop working and the account (lock) reversal is visible in stdout. \ No newline at end of file