Skip to content

Commit

Permalink
tasks: finish ui when there's no more pending/running tasks
Browse files Browse the repository at this point in the history
This potentially fixes a race condition for very fast single tasks.
  • Loading branch information
domenkozar committed Oct 1, 2024
1 parent 68ae63d commit 436fe94
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions devenv/src/tasks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -734,11 +734,6 @@ impl TasksUi {
let mut last_list_height: u16 = 0;

loop {
let mut finished = false;
if handle.is_finished() {
finished = true;
}

let tasks_status = self.get_tasks_status().await;

let status_summary = [
Expand Down Expand Up @@ -822,7 +817,7 @@ impl TasksUi {
term.write_line(&output.to_string())?;
}

if finished {
if tasks_status.pending == 0 && tasks_status.running == 0 {
break;
}

Expand Down

0 comments on commit 436fe94

Please sign in to comment.