-
Notifications
You must be signed in to change notification settings - Fork 277
Open
Description
- Why isn't ^C printed to the terminal?
- Why is the spinner still drawn after calling
finish_and_clear? - (optional) What could cause the terminal to break the way it did inside the Nix devShell? I don't expect you to have any experience with Nix, so that's optional; just in case you have ay ideas. I've created an issue on NixOS forum about it — link.
I feel like there is a race condition somewhere inside this code, but I don't understand what exactly causes it.
Minimal Reproducible Example
Archive
main.rs
#[tokio::main]
async fn main() {
let pb = indicatif::ProgressBar::new_spinner().with_message("Beep-boop...");
pb.enable_steady_tick(std::time::Duration::from_millis(80));
tokio::signal::ctrl_c()
.await
.expect("should be able to set Ctrl-C handler");
pb.finish_and_clear();
tokio::time::sleep(std::time::Duration::from_secs(2)).await;
println!("AHAHHAHA WHAT??????");
}Screencast of the issue
indicatif-async-nix.mp4
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels