Example #1
0
        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();
            }
        }