예제 #1
0
 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");
 }
예제 #2
0
파일: Runmode.cs 프로젝트: Dnantz/tpp-core
 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");
 }
예제 #3
0
        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");
        }
예제 #4
0
 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");
 }