예제 #1
0
 private void copyFile(string dirName1, string dirName2, string[] files)
 {
     string[] arr;
     foreach (string file in files)
     {
         arr = file.Split('\\');
         poolQueue.EnqueueTask(this, file, dirName2 + "\\" + arr[arr.Length - 1]);
     }
 }
예제 #2
0
파일: lab_1.cs 프로젝트: ZhenyaStep/SPP
        static void Main(string[] args)
        {
            PoolQueue PoolQueue = new PoolQueue(3);

            for (int i = 0; i < 10; i++)
            {
                PoolQueue.EnqueueTask(doSmth);
            }
            Console.ReadLine();
        }
예제 #3
0
        static void Main(string[] args)
        {
            PoolQueue PoolQueue = new PoolQueue(3);

            Console.WriteLine("current proc id = " + Thread.CurrentThread.ManagedThreadId);
            for (int i = 0; i < 10; i++)
            {
                PoolQueue.EnqueueTask(doSmth);
            }
            Console.ReadLine();
        }