package com.rj.ai;

import com.alibaba.fastjson.JSONObject;

import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * Author: 李中华  wx: spllzh  email(qq): 28668817@qq.com
 * Date: 2025/9/11 14:24
 **/
public class ThreadTest {

    public static void main(String[] args) {


        ExecutorService executorService = Executors.newFixedThreadPool(2);


        long startTime = System.currentTimeMillis();
        CompletableFuture<Void> summaryFuture = CompletableFuture.runAsync(() -> {
            //第一个业务场景  开始：    总结和分类业务场景
            try {
                Thread.sleep(10000);
                System.out.println("第一个业务场景  结束");
            } catch (Exception e) {
                e.printStackTrace();
            }
        }, executorService);
        long endTime = System.currentTimeMillis();
        System.out.println("线程启动完成："+(endTime - startTime));


    }
}
