diff --git a/notes/Java 并发.md b/notes/Java 并发.md index 8b26ae91..cc2c28a9 100644 --- a/notes/Java 并发.md +++ b/notes/Java 并发.md @@ -766,7 +766,7 @@ run..run..run..run..run..run..run..run..run..run..end 用来控制多个线程互相等待,只有当多个线程都到达时,这些线程才会继续执行。 -和 CountdownLatch 相似,都是通过维护计数器来实现的。线程执行 await() 方法之后计数器会减 1,并进行等待,直到计数器为 0,所有调用 awati() 方法而在等待的线程才能继续执行。 +和 CountdownLatch 相似,都是通过维护计数器来实现的。线程执行 await() 方法之后计数器会减 1,并进行等待,直到计数器为 0,所有调用 await() 方法而在等待的线程才能继续执行。 CyclicBarrier 和 CountdownLatch 的一个区别是,CyclicBarrier 的计数器通过调用 reset() 方法可以循环使用,所以它才叫做循环屏障。 diff --git a/notes/设计模式.md b/notes/设计模式.md index 6d779e2f..38713e5f 100644 --- a/notes/设计模式.md +++ b/notes/设计模式.md @@ -2578,7 +2578,7 @@ public class Client { 组合对象拥有一个或者多个组件对象,因此组合对象的操作可以委托给组件对象去处理,而组件对象可以是另一个组合对象或者叶子对象。 -