示例#1
0
        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();
        }
示例#2
0
 // On CTOR setting prgoram running
 // getting ThreadManger since bool can only be copied
 public GuradBool(ThreadManger threadManger)
 {
     this.programRunning = threadManger.getBool();
     this.programRunning = true;
 }