Skip to content

Rework command listener for interactive window #7164

@joyceerhl

Description

@joyceerhl

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

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bugdebtCode quality issuesinteractive-windowImpacts interactive window

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions