public async Task EnsureBrokerStartedAsync(string name, IServiceContainer services) { var lockToken = await _connectLock.WaitAsync(); try { if (!lockToken.IsSet) { _process = new RemoteBrokerProcess(name, _logFolder, services.FileSystem(), services.GetService <IRInstallationService>(), services.Process()); await _process.StartAsync(() => { _process = null; _connectLock.EnqueueReset(); }); } lockToken.Set(); } finally { lockToken.Reset(); } }
public async Task EnsureBrokerStartedAsync(string name) { var lockToken = await _connectLock.WaitAsync(); try { if (!lockToken.IsSet) { _process = new RemoteBrokerProcess(name, _logFolder, _fileSystem, _installations, _processService); await _process.StartAsync(() => { _process = null; _connectLock.EnqueueReset(); }); } lockToken.Set(); } finally { lockToken.Reset(); } }