s-day06--线程池的概念与操作

This commit is contained in:
xx
2026-10-19 16:23:07 +08:00
parent c7f0c0dba0
commit cf844fba2f
2 changed files with 81 additions and 0 deletions
@@ -0,0 +1,13 @@
package com.inmind.thread_pool08;
public class Task implements Runnable{
@Override
public void run() {
System.out.println(Thread.currentThread().getName() + "正在执行任务");
try {
Thread.sleep(20000);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}