Skip to content

Commit

Permalink
[improve](common) Add synchronized to avoid concurrent modification (a…
Browse files Browse the repository at this point in the history
  • Loading branch information
w41ter committed Oct 25, 2024
1 parent 0700449 commit da16b43
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 da16b43

Please sign in to comment.