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

Uninstall deferred event handlers after the pty is ready #215

Open
Tyriar opened this issue Aug 14, 2018 · 1 comment
Open

Uninstall deferred event handlers after the pty is ready #215

Tyriar opened this issue Aug 14, 2018 · 1 comment
Labels
bug Issue identified by VS Code Team member as probable bug windows

Comments

@Tyriar
Copy link
Member

Tyriar commented Aug 14, 2018

In WindowsTerminal there are ['connect', 'data', 'end', 'timeout', 'drain'] event listeners which handle event handler deferreds, we should uninstall these handlers after it's ready. This would reduce the amount of code that is run when a data event is triggered.

@Tyriar Tyriar added bug Issue identified by VS Code Team member as probable bug windows labels Aug 14, 2018
@gpetrov
Copy link

gpetrov commented Sep 7, 2020

@Tyriar Please reconsider also how you set the ready state ... now isReady is only set on the first data event, however I just had a case when no output data was send and the command just ends. So the 'exit' is fired without any data. This is a valid case.

However now you can't destroy the terminal or kill it, as the deferreds are still in place waiting for the ready state ... which never comes.

Maybe be also destroy and kill shouldn't really be using deferreds and just kill the whole thing. Or add a timeout parameter to destroy/kill anyway after a specific time - no matter if command is running.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug windows
Projects
None yet
Development

No branches or pull requests

2 participants