private async Task PollJobs(CancellationToken cancellationToken) { using (var stream = client.ActivateJobs(activeRequest)) { var responseStream = stream.ResponseStream; while (await responseStream.MoveNext(cancellationToken)) { var response = responseStream.Current; foreach (var job in response.Jobs) { workItems.Enqueue(new ActivatedJob(job)); } } } }