public void Send(string message, SourceInfo info) { var subscribers = info.GetSubscribers(); if (subscribers.Count == 0) { return; } lock (lockObj) { subscribers .AsParallel() .WithDegreeOfParallelism(Environment.ProcessorCount) .ForAll(async x => await sseClient.SendMessageAsync(x, message)); } }