As far as I know the Multithreading programming utilizes threads but these threads can utilize only one CPU core.
Parallel Programming utilizes all the CPU cores in contrast to the Multithreading programming.
But how can I check that? How can I check which CPU cores (not threads) use my programme on windows?
Parallel.Invoke(Method1, Method2, Method3);
static void Method1()
{
Console.WriteLine("start Method1");
Thread.Sleep(40000);
Console.WriteLine("stop Method1");
}
static void Method2()
{
Console.WriteLine("start Method2");
Thread.Sleep(40000);
Console.WriteLine("stop Method2");
}
static void Method3()
{
Console.WriteLine("start Method3");
Thread.Sleep(40000);
Console.WriteLine("stop Method3");
}