Skip to content

Commit 6326ef2

Browse files
更新文档
1 parent b110dcf commit 6326ef2

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
<p align="center">
21
<img src="https://images.gitee.com/uploads/images/2020/1022/231243_f2ae30da_2071767.png" width="229" height="210" alt="Icon"/>
32

43
# PDConcurrent
@@ -33,7 +32,7 @@ public static
3332
void main(String[] args) {
3433
lock.read(() -> {
3534
// 并发域代码内容
36-
[return null;]? // 可选择是否返回
35+
return null; // 可选择是否返回
3736
});
3837
}
3938
```
@@ -56,11 +55,13 @@ void main(String[] args) {
5655
// 使用
5756
lock.read(() -> {
5857
// 并发域代码内容
58+
return null;
5959
});
6060

6161
// 不使用
62-
synchronized ( new Object() ){
62+
synchronized ( lock ){
6363
// 并发域代码内容
64+
return null;
6465
}
6566
}
6667

@@ -70,8 +71,6 @@ void main(String[] args) {
7071

7172
支持使用`newCondition()`获取`Condition`对象
7273

73-
支持通过`isLocked()`检查是否被占用
74-
7574
```java
7675
public static
7776
void main(String[] args) {

0 commit comments

Comments
 (0)