Sunday, December 20, 2015

Task vs parallel

Parallel is faster than Task.

Task
task = new Task(() => DoSomething());
task.Start();
task.Wait();

------------------

Action action = new Action(() => SendSMSAsync(DoSomething()));

Parallel.Invoke(action);   

No comments:

Post a Comment