未验证 提交 8a0058b9 编写于 作者: D Daniel Imms 提交者: GitHub

Merge pull request #113549 from nrayburn-tech/issue-107028

lazier loading of windowsProcessTree
......@@ -52,10 +52,6 @@ export class WindowsShellHelper extends Disposable implements IWindowsShellHelpe
}
private async _startMonitoringShell(): Promise<void> {
if (!windowsProcessTree) {
windowsProcessTree = await import('windows-process-tree');
}
if (this._isDisposed) {
return;
}
......@@ -133,7 +129,10 @@ export class WindowsShellHelper extends Disposable implements IWindowsShellHelpe
if (this._currentRequest) {
return this._currentRequest;
}
this._currentRequest = new Promise<string>(resolve => {
this._currentRequest = new Promise<string>(async resolve => {
if (!windowsProcessTree) {
windowsProcessTree = await import('windows-process-tree');
}
windowsProcessTree.getProcessTree(this._rootProcessId, (tree) => {
const name = this.traverseTree(tree);
this._currentRequest = undefined;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册