Exemple #1
0
 public void PushToCompressedFilePathsQueue(string fsPath, ThreadPoolParams CBObj)
 {
     lock (CompressedFilePaths)
     {
         Console.WriteLine(" PushToCompressedFilePathsQueue " + fsPath);
         CompressedFilePaths.Enqueue(fsPath);
         System.Threading.Monitor.Pulse(CompressedFilePaths);
         CBObj.IsAvailable = true;
     }
 }
Exemple #2
0
        public void InitializeInternals()
        {
            JobPool = new ThreadPoolParams[MAXTHREAD];
            for (int i = 0; i < MAXTHREAD; i++)
            {
                JobPool[i] = new ThreadPoolParams();
                JobPool[i].Init(this.PushToCompressedFilePathsQueue);
            }

            //Start the TCPSenderThread thread
            TCPSenderThread = new Thread(this.TCPSender);
            TCPSenderThread.Start();
            //Start AllocationThread

            AllocationThread = new Thread(this.Allocator);
            AllocationThread.Start();
        }