Theoretical handling of stream non-availability or delayed availability #1435
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.
Context
Earlier today I encountered another instance of the task UI hanging indefinitely after a command execution. I didn't have the logging in place to diagnose the issue, and I'm still trying to repro it in my dogfooding build, but in the meantime these are some theoretical edge cases that may be worth handling.
stream_unavailableevent so that we can close the process out instead of waiting indefinitely for a stream that is never to going to be available. This is a theoretical fix; I don't know if it can happen in practice.await streamAvailableusingPromise.race. This ensures that we can unlock the UI if there's some delay on stream availability. Again, this is theoretical.Implementation
Screenshots
How to Test
Get in Touch
Important
Prevent UI lock by handling unavailable streams and adding timeouts in terminal command executions.
stream_unavailableevent inTerminalManagerif execution stream is undefined but process object exists.await streamAvailableinTerminalProcessusingPromise.raceto prevent indefinite UI lock.TerminalManagerandTerminalProcessfor better diagnostics.stream_unavailableevent toTerminalProcessEventsinTerminalProcess.ts.This description was created by
for eee7bbe. It will automatically update as commits are pushed.