-
Notifications
You must be signed in to change notification settings - Fork 111
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
read_char() breaks println! in other threads #136
Comments
I believe that this cannot be fixed because |
I have the same issue. |
Indeed the terminal is set to raw mode in This single line fixes the behavior reported here:
As it only changes the output attributes, I think it won't interfere with the rest of the function, but I did not test it extensively. Also it may be more elegant to actually determine the precise termios flag set required, but I'm not knowledgeable enough on terminal control attributes to really figure that out. |
Sort of, I have had success by inserting a carriage return before every single printed newline. So basically instead of |
I wrote a |
In console 0.15.7, read_char() won't break println!() in other threads: - console-rs/console#165 - console-rs/console#136 "terminal::writeline!()" was a workaround for this problem. So it's no longer needed.
* Remove "terminal::writeline!()" macro In console 0.15.7, read_char() won't break println!() in other threads: - console-rs/console#165 - console-rs/console#136 "terminal::writeline!()" was a workaround for this problem. So it's no longer needed.
OUTPUT:
EXPECTED:
I don't know if I'm doing something wrong, but listening for chars on one thread is breaking (carriage returns?) output on other threads.
The text was updated successfully, but these errors were encountered: