public async Task Run() { _logger.LogInformation("Dualcore mode starting"); _modeBase.Start(); while (!_stopToken.ShouldStop) { // there is no sequence, just busyloop await Task.Delay(TimeSpan.FromMilliseconds(100)); } _logger.LogInformation("Dualcore mode ended"); }
public async Task Run() { _logger.LogInformation("Runmode starting"); _modeBase.Start(); while (!_stopToken.ShouldStop) { // TODO run main loop goes here await Task.Delay(TimeSpan.FromMilliseconds(100)); } _logger.LogInformation("Runmode ended"); }
public async Task Run() { _logger.LogInformation("Dualcore mode starting"); _modeBase.Start(); Task overlayWebsocketTask = _broadcastServer.Listen(); while (!_stopToken.ShouldStop) { // there is no sequence, just busyloop await Task.Delay(TimeSpan.FromMilliseconds(100)); } await _broadcastServer.Stop(); await overlayWebsocketTask; _logger.LogInformation("Dualcore mode ended"); }
public async Task Run() { _logger.LogInformation("Matchmode starting"); _modeBase.Start(); Task overlayWebsocketTask = _broadcastServer.Listen(); while (!_stopToken.ShouldStop) { _loopCancelToken = new CancellationTokenSource(); try { await Loop(_loopCancelToken.Token); } catch (OperationCanceledException) { _logger.LogInformation("Match loop cancelled"); } } await _broadcastServer.Stop(); await overlayWebsocketTask; _logger.LogInformation("Matchmode ended"); }