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

Use getDelayedChannel to avoid awaiting promise #182656

Merged
merged 1 commit into from
May 16, 2023
Merged

Conversation

Tyriar
Copy link
Member

@Tyriar Tyriar commented May 16, 2023

Part of #175335

@Tyriar Tyriar added this to the May 2023 milestone May 16, 2023
@Tyriar Tyriar self-assigned this May 16, 2023
Comment on lines +106 to +118
this._proxy.onProcessData(e => this._ptys.get(e.id)?.handleData(e.event));
this._proxy.onDidChangeProperty(e => this._ptys.get(e.id)?.handleDidChangeProperty(e.property));
this._proxy.onProcessExit(e => {
const pty = this._ptys.get(e.id);
if (pty) {
pty.handleExit(e.event);
this._ptys.delete(e.id);
}
});
proxy.onProcessReady(e => this._ptys.get(e.id)?.handleReady(e.event));
proxy.onProcessReplay(e => this._ptys.get(e.id)?.handleReplay(e.event));
proxy.onProcessOrphanQuestion(e => this._ptys.get(e.id)?.handleOrphanQuestion());
proxy.onDidRequestDetach(e => this._onDidRequestDetach.fire(e));
this._proxy.onProcessReady(e => this._ptys.get(e.id)?.handleReady(e.event));
this._proxy.onProcessReplay(e => this._ptys.get(e.id)?.handleReplay(e.event));
this._proxy.onProcessOrphanQuestion(e => this._ptys.get(e.id)?.handleOrphanQuestion());
this._proxy.onDidRequestDetach(e => this._onDidRequestDetach.fire(e));
Copy link
Member

Choose a reason for hiding this comment

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

are these disposables? Do they need to be registered as such?

Copy link
Member Author

Choose a reason for hiding this comment

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

The backend owns the proxy so we could expose that, but we don't currently as the object never actually gets disposed.

@Tyriar Tyriar merged commit 17db88a into main May 16, 2023
@Tyriar Tyriar deleted the tyriar/utility_ptyhost__4 branch May 16, 2023 19:25
@github-actions github-actions bot locked and limited conversation to collaborators Jun 30, 2023
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.

3 participants