package com.dcsoft.system.controller;

import cn.hutool.core.thread.ThreadUtil;

import java.util.concurrent.*;

public class ThreadTest1 {
    public static void main(String[] args) throws ExecutionException, InterruptedException {
        for (int i = 0; i < 3; i++) {
            ThreadUtil.execAsync(() -> {
                ThreadLocalRandom threadLocalRandom = ThreadLocalRandom.current();
                int number = threadLocalRandom.nextInt(20) + 1;
                System.out.println(number);
            });
//            System.out.println("当前第：" + i + "个线程");
        }
//        System.out.println("task finish!");


    }
}
