In c# How to call webservice method concurrently with the help of multithreading? for Unit testing
I want to simulate webservice concurrency,so that at same time multiple threads(eg 10 threads) calling same webservice.Same time response time of each call needs to be captured.
Which is the best
foreach (Thread t in pool)
{t.Start();}
or
Parallel.For(0, 10, new ParallelOptions() { MaxDegreeOfParallelism = 10 }, i =>
{ }
Aucun commentaire:
Enregistrer un commentaire