Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
class Program
    static void Main()
        const int DoisSegundos = 2000;

        var tasks = new List<Task>();
        var listaEventos = Enumerable.Range(1, 1000);

        listaEventos.ToList().ForEach((idEvento) =>
            tasks.Add(Task.Run(() =>
                Thread.Sleep(DoisSegundos); //Chamada para um Web Service

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.