随笔分类 -  多线程

摘要:{ Thread thread = new Thread(() -> { for (int j = 0; j < 300000; j++) { if (Thread.currentThread().isInterrupted()){ break; } System.out.println(j); t 阅读全文
posted @ 2024-05-09 17:23 每月工资一万八 阅读(5) 评论(0) 推荐(0) 编辑
摘要:import java.util.ArrayList; import java.util.List; import java.util.concurrent.*; public class Main { public static void main(String[] args) { int cor 阅读全文
posted @ 2024-05-09 16:20 每月工资一万八 阅读(4) 评论(0) 推荐(0) 编辑
摘要:import java.util.concurrent.ArrayBlockingQueue; import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.TimeUnit; public class Mai 阅读全文
posted @ 2024-05-09 16:19 每月工资一万八 阅读(90) 评论(0) 推荐(0) 编辑
摘要:public class CircularAtomicInteger { private final int minValue; private final int maxValue; private final AtomicInteger atomicInteger; public Circula 阅读全文
posted @ 2023-09-05 10:53 每月工资一万八 阅读(53) 评论(0) 推荐(0) 编辑
摘要:需求背景: 每次传入需要办卡的订单的集合,根据每个办卡订单进行办卡操作。 技术要点:线程池,CompletableFuture 入参: BatchApplyOrderRequestVo { * 订单id @ApiModelProperty("etc批量办卡申请订单实体") @NotNull(grou 阅读全文
posted @ 2023-08-14 17:15 每月工资一万八 阅读(15) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示