s-day06-线程池:处理runnable任务

This commit is contained in:
2026-08-06 16:52:04 +08:00
parent 7d43d45d32
commit fda7e5302f
2 changed files with 47 additions and 0 deletions
@@ -0,0 +1,13 @@
package com.inmind.threadpool10;
//线程任务!!!
public class Task implements Runnable{
@Override
public void run() {
System.out.println(Thread.currentThread().getName()+"正在执行任务");
try {
Thread.sleep(10000);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}