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