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

Rework command listener for interactive window #7164

Closed
joyceerhl opened this issue Aug 17, 2021 · 1 comment
Closed

Rework command listener for interactive window #7164

joyceerhl opened this issue Aug 17, 2021 · 1 comment
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug debt Code quality issues interactive-window Impacts interactive window

Comments

@joyceerhl
Copy link
Contributor

We introduced promise chaining in the interactive window to fix a problem in the interactive window where cells executed in rapid succession would get executed out of order:

// Chain execution promises so that cells are executed in the right order
if (this.executionPromise) {
this.executionPromise = this.executionPromise.then(() =>
this.createExecutionPromise(code, fileUri, line, isDebug)
);
} else {
this.executionPromise = this.createExecutionPromise(code, fileUri, line, isDebug);
}
return this.executionPromise;

This doesn't work very well, because the chained promises do not get correctly cancelled on an interrupt or restart. It also doesn't address problems like #6982. Instead we should use the CellExecutionQueue to queue cells for execution

@joyceerhl joyceerhl added bug Issue identified by VS Code Team member as probable bug interactive-window Impacts interactive window labels Aug 17, 2021
@joyceerhl joyceerhl self-assigned this Aug 17, 2021
@greazer greazer added debt Code quality issues and removed needs-triage labels Aug 19, 2021
@greazer greazer added this to the September 2021 milestone Aug 19, 2021
@greazer greazer modified the milestones: September 2021, October 2021 Sep 23, 2021
@greazer greazer removed this from the October 2021 milestone Oct 7, 2021
@amunger amunger self-assigned this Aug 8, 2022
@amunger
Copy link
Contributor

amunger commented Aug 9, 2022

This is already complete for cells added from a python file, kernelExecution holds a map of ExecutionQueues per document. Code executed from the input box does not go through the same queue since vscode core calls the execution, but that is accounted for in #10671

@amunger amunger closed this as completed Aug 9, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug debt Code quality issues interactive-window Impacts interactive window
Projects
None yet
Development

No branches or pull requests

4 participants