Skip to content
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

Merged
merged 1 commit into from
Sep 30, 2022

Conversation

andyleejordan
Copy link
Member

@andyleejordan andyleejordan commented Sep 30, 2022

We generalized the "execution busy status" from just editor commands to any running PowerShell task.

@andyleejordan andyleejordan force-pushed the andschwa/busy-indicator branch 2 times, most recently from 2ec7d59 to 5816987 Compare September 30, 2022 17:59
@andyleejordan andyleejordan changed the title WIP: Generalized busy indicator Generalize the execution busy status to all PowerShell tasks Sep 30, 2022
@@ -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?
Copy link
Member Author

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.

Copy link
Collaborator

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...)

Copy link
Member Author

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!

Copy link
Collaborator

@SeeminglyScience SeeminglyScience left a 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:

  1. Start debugging - busy
  2. Breakpoint hit - not busy
  3. Continue - busy
  4. Breakpoint hit - not busy
  5. typed while ($true) { } - busy
  6. hit ctrl c - not busy
  7. Continue - busy
  8. 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

@andyleejordan andyleejordan merged commit b0afd8c into main Sep 30, 2022
@andyleejordan andyleejordan deleted the andschwa/busy-indicator branch September 30, 2022 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Engine Issue-Enhancement A feature request (enhancement).
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants