diff --git a/README.md b/README.md index 782840b..0f47acd 100644 --- a/README.md +++ b/README.md @@ -84,7 +84,7 @@ After the `main` thread field `stop` is `true`, the task thread continues to run ### Quickly run ```bash -mvn compile exec:java -Dexec.mainClass=fucking.concurrency.demo.NoPublishDemo +./mvnw compile exec:java -Dexec.mainClass=fucking.concurrency.demo.NoPublishDemo ``` ## 🍺 Infinite loop of `HashMap` @@ -104,7 +104,7 @@ The main thread Block is determined by no continuous output, that is, the endles ### Quickly run ```bash -mvn compile exec:java -Dexec.mainClass=fucking.concurrency.demo.HashMapHangDemo +./mvnw compile exec:java -Dexec.mainClass=fucking.concurrency.demo.HashMapHangDemo ``` ## 🍺 Combined state read invalid combination @@ -127,7 +127,7 @@ The second state read in the task thread is not twice the value of the first sta ### Quickly run ```bash -mvn compile exec:java -Dexec.mainClass=fucking.concurrency.demo.InvalidCombinationStateDemo +./mvnw compile exec:java -Dexec.mainClass=fucking.concurrency.demo.InvalidCombinationStateDemo ``` ## 🍺 `long` variable read invalid value @@ -149,7 +149,7 @@ In the task thread, a long variable whose upper 4 bytes and lower 4 bytes are di ### Quickly run ```bash -mvn compile exec:java -Dexec.mainClass=fucking.concurrency.demo.InvalidLongDemo +./mvnw compile exec:java -Dexec.mainClass=fucking.concurrency.demo.InvalidLongDemo ``` ## 🍺 the result of concurrency count without synchronization is wrong @@ -167,7 +167,7 @@ The count value is incorrect. ### Quickly run ```bash -mvn compile exec:java -Dexec.mainClass=fucking.concurrency.demo.WrongCounterDemo +./mvnw compile exec:java -Dexec.mainClass=fucking.concurrency.demo.WrongCounterDemo ``` ## 🍺 Synchronization on mutable fields @@ -188,7 +188,7 @@ The final count of Listeners is incorrect. ### Quickly run ```bash -mvn compile exec:java -Dexec.mainClass=fucking.concurrency.demo.SynchronizationOnMutableFieldDemo +./mvnw compile exec:java -Dexec.mainClass=fucking.concurrency.demo.SynchronizationOnMutableFieldDemo ``` ## 🍺 Deadlock caused by the symmetric locks @@ -208,7 +208,7 @@ Task thread deadlocked. ### Quickly run ```bash -mvn compile exec:java -Dexec.mainClass=fucking.concurrency.demo.SymmetricLockDeadlockDemo +./mvnw compile exec:java -Dexec.mainClass=fucking.concurrency.demo.SymmetricLockDeadlockDemo ``` ## 🍺 Livelock caused by reentrant locks @@ -230,5 +230,5 @@ this is a livelock. ### Quickly run ```bash -mvn compile exec:java -Dexec.mainClass=fucking.concurrency.demo.ReentrantLockLivelockDemo +./mvnw compile exec:java -Dexec.mainClass=fucking.concurrency.demo.ReentrantLockLivelockDemo ``` diff --git a/docs/zh-CN/README.md b/docs/zh-CN/README.md index d20f81d..b776a32 100644 --- a/docs/zh-CN/README.md +++ b/docs/zh-CN/README.md @@ -84,7 +84,7 @@ Demo类[`NoPublishDemo`](../../src/main/java/fucking/concurrency/demo/NoPublishD ### 快速运行 ```bash -mvn compile exec:java -Dexec.mainClass=fucking.concurrency.demo.NoPublishDemo +./mvnw compile exec:java -Dexec.mainClass=fucking.concurrency.demo.NoPublishDemo ``` ## 🍺 `HashMap`的死循环 @@ -104,7 +104,7 @@ Demo类[`HashMapHangDemo`](../../src/main/java/fucking/concurrency/demo/HashMapH ### 快速运行 ```bash -mvn compile exec:java -Dexec.mainClass=fucking.concurrency.demo.HashMapHangDemo +./mvnw compile exec:java -Dexec.mainClass=fucking.concurrency.demo.HashMapHangDemo ``` ## 🍺 组合状态读到无效组合 @@ -125,7 +125,7 @@ Demo类[`InvalidCombinationStateDemo`](../../src/main/java/fucking/concurrency/d ### 快速运行 ```bash -mvn compile exec:java -Dexec.mainClass=fucking.concurrency.demo.InvalidCombinationStateDemo +./mvnw compile exec:java -Dexec.mainClass=fucking.concurrency.demo.InvalidCombinationStateDemo ``` ## 🍺 `long`变量读到无效值 @@ -147,7 +147,7 @@ Demo类[`InvalidLongDemo`](../../src/main/java/fucking/concurrency/demo/InvalidL ### 快速运行 ```bash -mvn compile exec:java -Dexec.mainClass=fucking.concurrency.demo.InvalidLongDemo +./mvnw compile exec:java -Dexec.mainClass=fucking.concurrency.demo.InvalidLongDemo ``` ## 🍺 无同步的并发计数结果不对 @@ -165,7 +165,7 @@ Demo类[`WrongCounterDemo`](../../src/main/java/fucking/concurrency/demo/WrongCo ### 快速运行 ```bash -mvn compile exec:java -Dexec.mainClass=fucking.concurrency.demo.WrongCounterDemo +./mvnw compile exec:java -Dexec.mainClass=fucking.concurrency.demo.WrongCounterDemo ``` ## 🍺 在易变域上的同步 @@ -186,7 +186,7 @@ Demo类[`SynchronizationOnMutableFieldDemo`](../../src/main/java/fucking/concurr ### 快速运行 ```bash -mvn compile exec:java -Dexec.mainClass=fucking.concurrency.demo.SynchronizationOnMutableFieldDemo +./mvnw compile exec:java -Dexec.mainClass=fucking.concurrency.demo.SynchronizationOnMutableFieldDemo ``` ## 🍺 对称锁死锁 @@ -205,7 +205,7 @@ Demo类[`SymmetricLockDeadlockDemo`](../../src/main/java/fucking/concurrency/dem ### 快速运行 ```bash -mvn compile exec:java -Dexec.mainClass=fucking.concurrency.demo.SymmetricLockDeadlockDemo +./mvnw compile exec:java -Dexec.mainClass=fucking.concurrency.demo.SymmetricLockDeadlockDemo ``` ## 一些并发的问题讨论和资料