-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
REPL errors "randomly" after fake Pkg prompt PR #54754
Comments
Seems to be an issue with this line. Is there a more correct way to wait on input but not error on eof? julia/stdlib/REPL/src/LineEdit.jl Line 2834 in ce38f08
|
Normally, the way to do that is to have 2 separate tasks, each responsible for one event, instead of having 3 tasks, each responsible for a semi-arbitrary set of events |
Sorry, I don't understand. Would you mind elaborating with code? |
Split each thing you want to do into a separate task, and don't try to complicatedly intermix them by ever using waitany |
I want to wait for the first of either
The current design is the only way I know how to do that without blocking while waiting on stdin or throwing away new input on stdin |
I think there are already a few other clients similar to that (e.g. see beep), though the current implementation of MVC does seem probably too tightly coupled between input and output to allow the clean injection of events that are not from the keymap |
Reading from stdin without consuming the input introduces a data race into the design, which is probably why it crashes for some people periodically |
Just as an example:
Probably related to #54674 looking at the blame.
cc @IanButterworth
The text was updated successfully, but these errors were encountered: