Skip to content

Commit

Permalink
[improve](common) Add synchronized to avoid concurrent modification #…
Browse files Browse the repository at this point in the history
…42384 (#42454)

cherry pick from #42384
  • Loading branch information
w41ter authored Oct 25, 2024
1 parent b88d4db commit 859332c
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 859332c

Please sign in to comment.