提交 42a87abb 编写于 作者: A affe

fix #2020, use wakeup() instead of writing duplicate code

上级 8ef01a6c
......@@ -1407,9 +1407,7 @@ public class CommitLog {
synchronized (this.requestsWrite) {
this.requestsWrite.add(request);
}
if (hasNotified.compareAndSet(false, true)) {
waitPoint.countDown(); // notify
}
this.wakeup();
}
private void swapRequests() {
......
......@@ -260,9 +260,7 @@ public class HAService {
synchronized (this.requestsWrite) {
this.requestsWrite.add(request);
}
if (hasNotified.compareAndSet(false, true)) {
waitPoint.countDown(); // notify
}
this.wakeup();
}
public void notifyTransferSome() {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册