FIX: Remove runloop execution while waiting for stdin #27528
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR summary
This would slow down the typing at a command prompt while waiting for stdin from the programs because each character would bounce for 0.01 seconds adding up to a noticeable slowdown when piping in characters from an external source. I thought this was needed while I was testing which is why I added that comment, but I just went through a few interactive test cases including the one from #26869 which all still worked interactively, and updated the display as expected. So I think we can safely remove it, but I'm not 100% on that.
The only way I could get this to fail was to interactively from my IDE "shift+enter" on the code blocks so that input was piped in. Is there a way to get that same effect in the interactive tests so we could add it there? Some quick tests with
p.communicate()
didn't slow it down for me in a script.closes #27515
PR checklist