-
Notifications
You must be signed in to change notification settings - Fork 217
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
Generalize the execution busy status to all PowerShell tasks #1928
Conversation
src/PowerShellEditorServices/Services/PowerShell/Host/PsesInternalHost.cs
Outdated
Show resolved
Hide resolved
2ec7d59
to
5816987
Compare
src/PowerShellEditorServices/Services/PowerShell/Execution/SynchronousPowerShellTask.cs
Show resolved
Hide resolved
src/PowerShellEditorServices/Services/PowerShell/Host/PsesInternalHost.cs
Show resolved
Hide resolved
src/PowerShellEditorServices/Services/PowerShell/Host/PsesInternalHost.cs
Show resolved
Hide resolved
@@ -935,19 +960,27 @@ private string InvokeReadLine(CancellationToken cancellationToken) | |||
} | |||
} | |||
|
|||
// TODO: Should we actually be directly invoking input versus queueing it as a task like everything else? |
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.
@SeeminglyScience IDK should we? It's kinda weird we just give up on the queue right here. Though we are in between processing the queue so it...works.
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.
iirc InvokePSCommand
doesn't actually queue anything, it just creates the task and immediately executes it. I had the same confusion when I first saw it (and might even still have some code somewhere I manually create the task thinking I needed to to get around queueing...)
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.
That's exactly what it does. It's annoyingly different!
src/PowerShellEditorServices/Services/PowerShell/Host/PsesInternalHost.cs
Show resolved
Hide resolved
5816987
to
49ece5a
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.
re: the debugging behavior, I'd suggest trying to make it work like we talked about on teams:
- Start debugging - busy
- Breakpoint hit - not busy
- Continue - busy
- Breakpoint hit - not busy
- typed while ($true) { } - busy
- hit ctrl c - not busy
- Continue - busy
- Debugging ends - not busy
That said, LGTM anyway. I wouldn't call matching up to the above to be a blocker. This is definitely good enough for how much more work the above would be
We generalized the "execution busy status" from just editor commands to any running PowerShell task.