summaryrefslogtreecommitdiff
path: root/cli/util/progress_bar/renderer.rs
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2022-12-19 11:19:33 -0500
committerGitHub <noreply@github.com>2022-12-19 11:19:33 -0500
commit2afac5bf78536060a53012c4f938b0390e8827de (patch)
tree2c4cd772d5b35543a8d31de47428de7ee3134042 /cli/util/progress_bar/renderer.rs
parent383d40a33bee842a7462fb157f5faca263598d87 (diff)
refactor(progress bars): global control for drawing (#17091)
This PR adds the concept of a global `DrawThread`, which can receive multiple renderers to draw information on the screen (note: the underlying thread is released back to tokio when it's not rendering). It also separates the concept of progress bars from the existing "draw thread". This makes it trivial for us to do stuff like show permission prompts and progress bars at the same time in the future. The reason this is global is because the process' tty stderr is also a global concept.
Diffstat (limited to 'cli/util/progress_bar/renderer.rs')
-rw-r--r--cli/util/progress_bar/renderer.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/cli/util/progress_bar/renderer.rs b/cli/util/progress_bar/renderer.rs
index 75a4cafed..d8fa1769d 100644
--- a/cli/util/progress_bar/renderer.rs
+++ b/cli/util/progress_bar/renderer.rs
@@ -23,7 +23,7 @@ pub struct ProgressData {
pub duration: Duration,
}
-pub trait ProgressBarRenderer: Send + std::fmt::Debug {
+pub trait ProgressBarRenderer: Send + Sync + std::fmt::Debug {
fn render(&self, data: ProgressData) -> String;
}