mirror of
https://github.com/Microsoft/vscode
synced 2024-09-13 21:55:38 +00:00
watcher - more dispose
and remove E15 workaround (#213540)
This commit is contained in:
parent
4ed3738da5
commit
2f0b7c280e
|
@ -89,6 +89,7 @@ export class UtilityProcessWorkerMainService extends Disposable implements IUtil
|
|||
this.logService.trace(`[UtilityProcessWorker]: disposeWorker(window: ${configuration.reply.windowId}, moduleId: ${configuration.process.moduleId})`);
|
||||
|
||||
worker.kill();
|
||||
worker.dispose();
|
||||
this.workers.delete(workerId);
|
||||
}
|
||||
}
|
||||
|
@ -98,7 +99,7 @@ class UtilityProcessWorker extends Disposable {
|
|||
private readonly _onDidTerminate = this._register(new Emitter<IUtilityProcessWorkerProcessExit>());
|
||||
readonly onDidTerminate = this._onDidTerminate.event;
|
||||
|
||||
private readonly utilityProcess = new WindowUtilityProcess(this.logService, this.windowsMainService, this.telemetryService, this.lifecycleMainService);
|
||||
private readonly utilityProcess = this._register(new WindowUtilityProcess(this.logService, this.windowsMainService, this.telemetryService, this.lifecycleMainService));
|
||||
|
||||
constructor(
|
||||
@ILogService private readonly logService: ILogService,
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { DisposableStore, toDisposable } from 'vs/base/common/lifecycle';
|
||||
import { DisposableStore } from 'vs/base/common/lifecycle';
|
||||
import { getDelayedChannel, ProxyChannel } from 'vs/base/parts/ipc/common/ipc';
|
||||
import { IFileChange } from 'vs/platform/files/common/files';
|
||||
import { AbstractUniversalWatcherClient, ILogMessage, IRecursiveWatcher } from 'vs/platform/files/common/watcher';
|
||||
|
@ -53,13 +53,6 @@ export class UniversalWatcherClient extends AbstractUniversalWatcherClient {
|
|||
return client.getChannel('watcher');
|
||||
})()));
|
||||
|
||||
// Looks like universal watcher needs an explicit stop
|
||||
// to prevent access on data structures after process
|
||||
// exit. This only seem to be happening when used from
|
||||
// Electron, not pure node.js.
|
||||
// https://github.com/microsoft/vscode/issues/136264
|
||||
disposables.add(toDisposable(() => watcher.stop()));
|
||||
|
||||
return watcher;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue