04 2022 档案

摘要: 阅读全文
posted @ 2022-04-05 20:50 yydssc 阅读(30) 评论(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 阅读(106) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2022-04-05 11:44 yydssc 阅读(58) 评论(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 阅读(158) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2022-04-04 11:25 yydssc 阅读(23) 评论(0) 推荐(0)
摘要:/** 线程封闭示例 */public class Demo5 { /** threadLocal变量,每个线程都有一个副本,互不干扰 */ public static ThreadLocal<String> value = new ThreadLocal<>(); /** * threadloca 阅读全文
posted @ 2022-04-04 10:32 yydssc 阅读(47) 评论(0) 推荐(0)