public void ProcessImageGet() { clsLog.Log("Starting a new thread..."); threadGet = new System.Threading.Thread(th => { var data = new DynData.LKQ.LKQImageClient(); while (true) { clsLog.LogInfo("Starting Image Get thread..."); data.GetImageData(); clsLog.LogInfo("Sleeping Image Get thread..."); System.Threading.Thread.Sleep(10000); } }); }
public void ProcessImagePush() { threadPush = new System.Threading.Thread(th => { var data = new DynData.LKQ.LKQImageClient(); while (true) { clsLog.LogInfo("Starting Image Push thread..."); data.PushImageData(); clsLog.LogInfo("Sleeping Image Push thread..."); System.Threading.Thread.Sleep(2000); } }); threadPush.Start(); }
public void RunImageThreads() { threadArray = new System.Threading.Thread[10]; for (int i = 0; i < threadArray.Count(); i++) { threadArray[i] = new System.Threading.Thread(th => { var data = new DynData.LKQ.LKQImageClient(); while (true) { clsLog.LogInfo("Starting a thread " + i + "..."); data.ProcessImage(); clsLog.LogInfo("Sleeping a thread " + i + "..."); System.Threading.Thread.Sleep(1000); } }); } for (int i = 0; i < threadArray.Count(); i++) { threadArray[i].Start(); } }