src/vs/platform/extensions/electron-main/workerMainProcessExtensionHostStarter.ts/WorkerMainProcessExtensionHostStarter/constructor
class WorkerMainProcessExtensionHostStarter:	constructor(
		@ILogService private readonly _logService: ILogService,
		@ILifecycleMainService lifecycleMainService: ILifecycleMainService
	) {
		this._proxy = null;

		const workerFactory: IWorkerFactory = {
			create: (moduleId: string, callback: IWorkerCallback, onErrorCallback: (err: any) => void): IWorker => {
				const worker = new NodeWorker(callback, onErrorCallback);
				worker.onError((err) => {
					this._logService.error(`ExtensionHostStarterWorker has encountered an error:`);
					this._logService.error(err);
				});
				worker.onMessageError((err) => {
					this._logService.error(`ExtensionHostStarterWorker has encountered a message error:`);
					this._logService.error(err);
				});
				worker.onExit((exitCode) => this._logService.info(`ExtensionHostStarterWorker exited with code ${exitCode}.`));
				worker.postMessage(moduleId, []);
				return worker;
			}
		};
		this._worker = new SimpleWorkerClient<ExtensionHostStarter, IExtensionHostStarterWorkerHost>(
			workerFactory,
			'vs/platform/extensions/node/extensionHostStarterWorker',
			new ExtensionHostStarterWorkerHost(this._logService)
		);
		this._initialize();

		// On shutdown: gracefully await extension host shutdowns
		lifecycleMainService.onWillShutdown((e) => {
			this._shutdown = true;
			if (this._proxy) {
				e.join(this._proxy.waitForAllExit(6000));
			}
		});
	}