class Program
{
static void Main()
{
var quantidadeThreads = 100;
for (int i = 0; i < quantidadeThreads; i++)
{
new Thread(new ThreadStart(() =>
{
//Infinitamente aberta, sempre sincronizando eventos...
while (true)
{
ObtemEventoDaFilaESincronizaComWebService();
}
})).Start();
}
Console.ReadLine();
}
private static void ObtemEventoDaFilaESincronizaComWebService()
{
Console.Write(".");
Thread.Sleep(2000);
}
}
Last active
February 5, 2017 21:33
-
-
Save fabriciorissetto/96b9db06f17bd10f4fdd0ab969a83845 to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment