mirror of
https://github.com/BlueMap-Minecraft/BlueMap.git
synced 2024-11-26 04:25:31 +01:00
Remove syncronization from estimateProgress() function
This commit is contained in:
parent
659fb99eb6
commit
f1f2336dff
@ -65,11 +65,13 @@ public synchronized boolean hasMoreWork() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public synchronized double estimateProgress() {
|
||||
public double estimateProgress() {
|
||||
if (!hasMoreWork()) return 1;
|
||||
int currentTask = this.currentTaskIndex;
|
||||
if (currentTask >= this.tasks.size()) return 1;
|
||||
|
||||
double total = currentTaskIndex;
|
||||
total += this.tasks.get(this.currentTaskIndex).estimateProgress();
|
||||
double total = currentTask;
|
||||
total += this.tasks.get(currentTask).estimateProgress();
|
||||
|
||||
return total / tasks.size();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user