Could anyone please give a sample or any link that describes how to spawn thread where each will do different work at the same time.
Suppose I have job1 and job2. I want to run both the jobs simultaneously. I need those jobs to get executed in parallel. how can I do that?
Well, fundamentally it’s as simple as:
However, there are other options such as the thread pool or (in .NET 4) using Parallel Extensions.
I have a threading tutorial which is rather old, and Joe Alabahari has one too.