未验证 提交 b54681cc 编写于 作者: R rongtong 提交者: GitHub

Merge pull request #2028 from imaffe/affe-0520-use-wakeup

[ISSUE #2020] Use wakeup() instead of writing duplicate code
......@@ -1404,9 +1404,7 @@ public class CommitLog {
synchronized (this.requestsWrite) {
this.requestsWrite.add(request);
}
if (hasNotified.compareAndSet(false, true)) {
waitPoint.countDown(); // notify
}
this.wakeup();
}
private void swapRequests() {
......
......@@ -261,9 +261,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.
先完成此消息的编辑!
想要评论请 注册