04 2022 档案

摘要: 阅读全文
posted @ 2022-04-05 20:50 yydssc 阅读(25) 评论(0) 推荐(0) 编辑
摘要:public class CounterUnsafe { volatile int i = 0; private static Unsafe unsafe = null; //i字段的偏移量 private static long valueOffset; static { //unsafe = U 阅读全文
posted @ 2022-04-05 11:46 yydssc 阅读(81) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2022-04-05 11:44 yydssc 阅读(45) 评论(0) 推荐(0) 编辑
摘要:import java.util.List;import java.util.concurrent.LinkedBlockingQueue;import java.util.concurrent.RejectedExecutionHandler;import java.util.concurrent 阅读全文
posted @ 2022-04-04 11:27 yydssc 阅读(139) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2022-04-04 11:25 yydssc 阅读(15) 评论(0) 推荐(0) 编辑
摘要:/** 线程封闭示例 */public class Demo5 { /** threadLocal变量,每个线程都有一个副本,互不干扰 */ public static ThreadLocal<String> value = new ThreadLocal<>(); /** * threadloca 阅读全文
posted @ 2022-04-04 10:32 yydssc 阅读(27) 评论(0) 推荐(0) 编辑

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