static void Main(string [] args) { var threadObject = new ThreadManger(); List <Thread> listOfThreads = new List <Thread>(); foreach (var process in args) { var monitorObject = new MonitorProcess(process); listOfThreads.Add(new Thread(() => monitorObject.startMonitorProcess(threadObject.getBool()))); } threadObject.setThreadList(listOfThreads); threadObject.StartAllThreads(); }
// CTOR setting data collection started public BoolWrapper(MonitorProcess value) { this.isBeingCollected = value.getBool(); this.isBeingCollected = true; }