예제 #1
0
        static void MainThread()
        {
            //主线程循环
            Console.WriteLine("Main Thread Loop Start");

            for (int loopCnt = 0, cnt = 0; true; loopCnt++)
            {
                Thread.Sleep(100);
                if (cnt < LocalFiles.Length && loopCnt % 20 == 0)
                {
                    Console.WriteLine(String.Format("Add {0} File", cnt + 1));
                    jobQueue.EnqueueJobs(new UploadJob("/lr/" + TargetFiles[cnt], LocalFiles[cnt]));
                    cnt++;
                }
                Console.WriteLine(jobQueue.JobsCount());
            }
        }