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()); }
public static void Stop() => WorkerThreads.ForEach(t => t.Stop());