Instantly share code, notes, and snippets.

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

        var listaEventos = Enumerable.Range(1, 1000);

        Parallel.ForEach(listaEventos,
            (idEvento) =>
        {
            Console.Write(".");
            Thread.Sleep(DoisSegundos); //Chamada pra um Web Service
        });
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment