Skip to content

Commit

Permalink
Do not brutally kill extension hosts in the abnormal shutdown case to…
Browse files Browse the repository at this point in the history
… unblock the build
  • Loading branch information
alexdima committed Nov 12, 2021
1 parent 09c9d4c commit 7bbae2d
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,15 @@ export class DirectMainProcessExtensionHostStarter extends ExtensionHostStarter
) {
super(logService);

// Abnormal shutdown: terminate extension hosts asap
lifecycleMainService.onWillKill(() => {
this.killAllNow();
});
// TODO: in the remote integration tests, this leads to the extension
// host processes getting killed brutally, which leads to the
// test resolver not having a chance to deactivate and kill the server processes
// it launches

// // Abnormal shutdown: terminate extension hosts asap
// lifecycleMainService.onWillKill(() => {
// this.killAllNow();
// });

// Normal shutdown: gracefully await extension host shutdowns
lifecycleMainService.onWillShutdown((e) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,18 @@ export class WorkerMainProcessExtensionHostStarter implements IDisposable, IExte
);
this._initialize();

// Abnormal shutdown: terminate extension hosts asap
lifecycleMainService.onWillKill(async () => {
this._shutdown = true;
if (this._proxy) {
this._proxy.killAllNow();
}
});
// TODO: in the remote integration tests, this leads to the extension
// host processes getting killed brutally, which leads to the
// test resolver not having a chance to deactivate and kill the server processes
// it launches

// // Abnormal shutdown: terminate extension hosts asap
// lifecycleMainService.onWillKill(async () => {
// this._shutdown = true;
// if (this._proxy) {
// this._proxy.killAllNow();
// }
// });

// Normal shutdown: gracefully await extension host shutdowns
lifecycleMainService.onWillShutdown((e) => {
Expand Down

0 comments on commit 7bbae2d

Please sign in to comment.