Skip to content

Cleanup extHostTerminalService.ts#84404

Merged
Tyriar merged 3 commits intomicrosoft:masterfrom
solomatov:cleanup_ext_host_terminals
Nov 17, 2019
Merged

Cleanup extHostTerminalService.ts#84404
Tyriar merged 3 commits intomicrosoft:masterfrom
solomatov:cleanup_ext_host_terminals

Conversation

@solomatov
Copy link
Contributor

@solomatov solomatov commented Nov 10, 2019

  • Remove code having no effect in _getTerminalByIdEventually
  • Remove unused method
  • Replace 200 with 2 * EXT_HOST_CREATION_DELAY

Please, correct me if I made something wrongly.

@solomatov solomatov closed this Nov 10, 2019
@solomatov solomatov deleted the cleanup_ext_host_terminals branch November 10, 2019 05:01
@solomatov solomatov restored the cleanup_ext_host_terminals branch November 10, 2019 05:01
@solomatov solomatov reopened this Nov 10, 2019
@solomatov
Copy link
Contributor Author

@Tyriar Any updates on this?

Comment on lines -553 to -556
} else {
this._getTerminalPromises[id].then(c => {
return this._createGetTerminalPromise(id, retries);
});
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the purpose of this code was to handle the case where the promise this._getTerminalPromises[id] resolves to undefined. It definitely doesn't work currently but that might be a case that's still an issue.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Tyriar But it doesn't return anything, so no effect. Or was there any side effect of invoking _getTerminalByIdEventually in code before some of the changes?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah it definitely didn't work so it's fine to remove, I think we're still missing that case though. Ideally the resolve function would be kept around, similar to how id promise works on BaseExtHostTerminal:

protected _idPromise: Promise<number>;
private _idPromiseComplete: ((value: number) => any) | undefined;

@Tyriar Tyriar added this to the November 2019 milestone Nov 17, 2019
@Tyriar Tyriar merged commit a8be2f9 into microsoft:master Nov 17, 2019
@solomatov solomatov deleted the cleanup_ext_host_terminals branch December 27, 2019 21:25
@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants