多线程
qq_392622734
这个作者很懒,什么都没留下…
展开
-
ThreadLocal的理解
ThreadLocal为什么可以设置为static?鸡肋的弱引用是否需要remove?原创 2022-07-31 17:35:40 · 163 阅读 · 0 评论 -
线程中new start run 的关系
public class Demo1 extends Thread{ public static void main(String[] args) { Thread thread1 = new Demo2(); Thread thread2 = new Demo2(); System.out.println(thread1.getName()); System.out.println(thread2.getName()); thread1.run(); .原创 2021-08-30 01:22:11 · 172 阅读 · 0 评论