コード例 #1
0
        public static void Start(int workerThreads, bool compressFiles)
        {
            var realThreadNumber = workerThreads > 0 ? workerThreads : Environment.ProcessorCount;

            for (var i = 0; i < realThreadNumber; ++i)
            {
                WorkerThreads.Add(new FilePreprocessorThread(TaskQueue, $"FPP-0{i + 1}", compressFiles));
            }
            WorkerThreads.ForEach(t => t.Start());
        }
コード例 #2
0
 public static void Stop() => WorkerThreads.ForEach(t => t.Stop());