From 436fe947b7f1bfc46003868b4a7315bdbc55b495 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Domen=20Ko=C5=BEar?= Date: Tue, 1 Oct 2024 11:30:21 +0100 Subject: [PATCH] tasks: finish ui when there's no more pending/running tasks This potentially fixes a race condition for very fast single tasks. --- devenv/src/tasks.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/devenv/src/tasks.rs b/devenv/src/tasks.rs index edf907fc1..844d4123d 100644 --- a/devenv/src/tasks.rs +++ b/devenv/src/tasks.rs @@ -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 = [ @@ -822,7 +817,7 @@ impl TasksUi { term.write_line(&output.to_string())?; } - if finished { + if tasks_status.pending == 0 && tasks_status.running == 0 { break; }