Skip to content

Commit

Permalink
[improve](common) Add synchronized to avoid concurrent modification (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
w41ter authored and Your Name committed Oct 25, 2024
1 parent df2ea71 commit 5aeaa4b
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public MarkedCountDownLatch(int count) {
marks = HashMultimap.create();
}

public void addMark(K key, V value) {
public synchronized void addMark(K key, V value) {
marks.put(key, value);
}

Expand All @@ -51,7 +51,7 @@ public synchronized List<Entry<K, V>> getLeftMarks() {
return Lists.newArrayList(marks.entries());
}

public Status getStatus() {
public synchronized Status getStatus() {
return st;
}

Expand Down

0 comments on commit 5aeaa4b

Please sign in to comment.