-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Console] block input stream if needed #50429
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
Conversation
Hey! Thanks for your PR. You are targeting branch "5.4" but it seems your PR description refers to branch "5.4,". Cheers! Carsonbot |
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.
Good catch. Thanks 👍🏼
When the input stream used in the question helper is not blocking, the default value is always used as the stream return false. In order to fix that, we force the stream to be in blocking state and go back to the old state after so other logic is not impacted by this change
453acbd
to
8ae36f3
Compare
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.
Works for me as-is
Good catch, thanks @joelwurtz. |
When the input stream used in the question helper is not blocking, the default value is always used as the stream return false instead of waiting. In order to fix that, we force the stream to be in blocking state and go back to the old state after so other logic is not impacted by this change.
I don't think making a test for that is possible without writing a lot of codes, as we need to have a stream that is not ready for this test, and make it ready later, given there is no async possible. it could be done with a fork or another process writing to a file after the question was asked so we do not block following tests when there is no failure, however i'm not sure if this is wanted ?.
If you have a clean way to make a reproducible test for this bug i'm open to write it.