public TimeSpan CalculateMany_UsingTpl_Good() { var cpuBoundExample = new CpuBoundExample(); var timeTaken = cpuBoundExample.CalculateMany_UsingTPL_Good(); // will use the CPU across multiple threads return(timeTaken); }
public TimeSpan CalculateMany_NoParallel_Bad() { var cpuBoundExample = new CpuBoundExample(); var timeTaken = cpuBoundExample.CalculateMany_NoParallel_Bad(); // this hogs the request thread and doesn't make use of the full CPU return(timeTaken); }