Starting tasks inside another task is duplicating my WebRequests
2
I use the code below to check some pdf files online and return a string accordingly. The problem is: When I added the second Task.Factory.StartNew() it started duplicating all requests, but still returning only one answer(as it should be). I need this to be as fast as possible so I can't waste time sending two requests to the server. public static void Main(string args) { var listT = new List<string>() { "24006025062" }; var task = listT.Select(x => Task.Factory.StartNew(() => TesteTask(x))); Task.WaitAll(task.ToArray(), TimeSpan.FromSeconds(120)); List<string> results = new List<string>(); foreach (var result in task) { resul