Skip to content

Commit

Permalink
(#2895) Make setting Progress value thread-safe
Browse files Browse the repository at this point in the history
  • Loading branch information
squaregoldfish committed Apr 24, 2024
1 parent 51bf17e commit b15275d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions WebApp/src/uk/ac/exeter/QuinCe/web/Progress.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,15 @@ public void setMax(float max) {
* The value.
*/
public void setValue(float value) {
this.value = value;
synchronized (this) {
this.value = value;
}
}

public void increment() {
this.value += 1;
synchronized (this) {
this.value += 1;
}
}

/**
Expand Down

0 comments on commit b15275d

Please sign in to comment.