FolderProcessor apps = new FolderProcessor("D:\\", "txt");
FolderProcessor documents = new FolderProcessor("E:\\", "txt");
// 在池中使用execute()方法执行这3个任务。
pool.execute(system);
pool.execute(apps);
pool.execute(documents);
// 将关于池每秒的状态信息写入到控制台,直到这3个任务完成它们的执行。
do {
System.out.printf("******************************************\n");
System.out.printf("Main: Parallelism: %d\n", pool.getParallelism());
System.out.printf("Main: Active Threads: %d\n", pool.getActiveThreadCount());