static void Main(string[] args) { var threads = new ThreadGenerator(); var output = threads.StartThreads(); Console.WriteLine(output); Console.ReadLine(); }
/// <summary> /// Simulate the current configuration /// </summary> /// <param name="currentSimulation"></param> /// <param name="dataPath"></param> /// <param name="rampUpPeriod"></param> public static void SimulateConfiguration(CurrentSimulation currentSimulation, string dataPath, int rampUpPeriod = 100) { ThreadGenerator.StopThreads(); CriticalSection.InitCriticalSection(currentSimulation.CriticalSectionDimension, dataPath); ThreadGenerator.InitThreads(currentSimulation); ThreadGenerator.StartThreads(rampUpPeriod); }