Secrets of .NET and best 80s movies
Try to Add this to the code
public static void MakeBreakTask()
{
Console.WriteLine("\n============================");
Console.WriteLine("\nMakeBreakTasknc");
Console.WriteLine("\nNOTE: tasks maybe using different threads provided by ThreadPool, but unlike parallel programming, it is only one thread at a time\n");
StartTimer();
WriteLog("MakeBreakTask Start");
var boilCoffeeTask = Task.Run( BoilCoffee);
var toastBreadTask = Task.Run(ToastBread);
var fryEggsTask = Task.Run(FryEggs);
Task.WaitAll(new[]{ boilCoffeeTask,toastBreadTask,fryEggsTask});
WriteLog("MakeBreakTask End");
Console.WriteLine($"\nTotal time: {_stopwatch.Elapsed.TotalMilliseconds}ms\n");
}
Try to Add this to the code
public static void MakeBreakTask()
{
Console.WriteLine("\n============================");
Console.WriteLine("\nMakeBreakTasknc");
Console.WriteLine("\nNOTE: tasks maybe using different threads provided by ThreadPool, but unlike parallel programming, it is only one thread at a time\n");
StartTimer();
WriteLog("MakeBreakTask Start");
var boilCoffeeTask = Task.Run( BoilCoffee);
var toastBreadTask = Task.Run(ToastBread);
var fryEggsTask = Task.Run(FryEggs);
Task.WaitAll(new[]{ boilCoffeeTask,toastBreadTask,fryEggsTask});
WriteLog("MakeBreakTask End");
Console.WriteLine($"\nTotal time: {_stopwatch.Elapsed.TotalMilliseconds}ms\n");
}