import java.util.concurrent.Callable;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.FutureTask;
//方法实现
public class App {
public static void main(String[] args) throws InterruptedException, ExecutionException {
Threads threadUtils = new Threads.ThreadBuilder().setThreadGroup("PAD").build();
threadUtils.setOperator(new Threads.operateThread() {
@Override
public void operatorBefore(Thread t) {
System.out.println(
"Excutor Before-------------------------------------------------->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>.");
}
@Override
public void operatorAfter(Thread t) {
System.out.println(
"Excutor After-------------------------------------------------->>>>>>>>>>>>>>>>>>>>>>>>>>>>
Java线程工具类(基于Thread)
最新推荐文章于 2024-01-28 14:33:17 发布