Skip to content

Commit

Permalink
fix(progresskeeper): dont remove task count listener until it reaches…
Browse files Browse the repository at this point in the history
… 0 (#5650)

If waitUltilDone() is called when you have 2 or more other tasks, the first one that is changed will still have tasks to wait for, but when it finishes it won't run because it was removed early.
(translated)
  • Loading branch information
TarikBR authored Jun 25, 2024
1 parent 74492ea commit df0b762
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ public static void waitUntilDone(final Runnable runnable) {
public void onUpdateTaskCount(int taskCount) {
if(taskCount == 0) {
runnable.run();
removeTaskCountListener(this);
}
removeTaskCountListener(this);
}
};
addTaskCountListener(listener);
Expand Down

0 comments on commit df0b762

Please sign in to comment.