public async void StartWorkAsync(CancellationToken token) { while (!token.IsCancellationRequested) { var item = _storage.GetNextTweetToAnalyse(); if (item != null) { var res = await _classifier.SentimentAnalysisAsync(item); //var result = await Task<string>.Run(() => _datumBoxApi.TwitterSentimentAnalysis(item.Text)); _storage.AddAnalysis(item, res); } else { await Task.Delay(100); } } }