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 authored Oct 24, 2024
1 parent c7aa76e commit b6c1540
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 Down Expand Up @@ -65,7 +65,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 b6c1540

Please sign in to comment.