-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Use a different std::thread::Thread
for Stdin
IO
#69
Conversation
See: https://docs.rs/tokio/latest/tokio/io/struct.Stdin.html > This handle is best used for non-interactive uses, such as when a > file is piped into the application. For technical reasons, stdin is > implemented by using an ordinary blocking read on a separate thread, > and it is impossible to cancel that read. This can make shutdown of > the runtime hang until the user presses enter. > > For interactive uses, it is recommended to spawn a thread dedicated to > user input and use blocking IO directly in that thread. Resolves: #61 Signed-off-by: Vaibhav Rabber <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made a change to use std::process::exit
as normal return Ok(())
wouldnt work.. maybe that can changed back to normal now?
Oh yeah, should be. Which change is this BTW? I'll revert it. |
can't find it, but can you just try breaking from the loop and do |
Signed-off-by: Vaibhav Rabber <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for finding and fixing this!
See: https://docs.rs/tokio/latest/tokio/io/struct.Stdin.html
Resolves: #61