-
-
Notifications
You must be signed in to change notification settings - Fork 491
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
Adding option to exit OTP progress bar #2041
Merged
Merged
Changes from 1 commit
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
63df0f1
RELEASE_NOTES=[ENHANCEMENT] Adding option to exit OTP progress bar
AnomalRoil d0eccf6
applying code review comments
AnomalRoil 7206681
fix merge conflict
AnomalRoil 3f06a5b
patching CI
AnomalRoil 59f84a4
Adding a loop for OTP
AnomalRoil b5945a7
Merge conflict
AnomalRoil File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
applying code review comments
RELEASE_NOTES=n/a Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>
- Loading branch information
commit d0eccf6471124d31c0900d94d9e6d3d8d3cc8765
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
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.
Actually I wonder if this is not waiting until the next keystroke, and thus this goroutine isn't returning when it should... (basically it's always in iteration 1 of the for loop...)
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.
Yeah, the goroutine is leaking when the OTP Bar finishes on line 52, I think.
Related: https://benjamincongdon.me/blog/2020/04/23/Cancelable-Reads-in-Go/
Seems like there isn't an easy way out...
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 think I'll have to refactor to use a cancelable reader, using a
io.Reader
onos.Stdin
and test it on Windows hoping it will work fine without all that boilerplate since we are just caring about key presses...