Async Programming

0

Well I have some doubts about asynchronous programming. I'd like to know more about how AsParallel() works in a List<Task> list. That is, if the tasks of this list is executed in parallel. Code sample:

var listaTarefas = algumaLista.Select(x => Task.Run() => { alguma ação...}).ToList();
return await Task.WhenAll(listaTarefas .AsParallel().Select(async task => await task));

The above code exemplifies the possible use of AsParallel, but I wonder how it enables task parallelism? A good performance gain? And the best way to apply parallelism is wrong?

    
asked by anonymous 31.10.2018 / 14:02

0 answers