摘要:
核心和最大线程数(Core and maximum pool sizes) ThreadPoolExecutor 会根据指定的 corePoolSize 和 maximunPoolSize 自动调整当前线程池内线程数量(通过 getPoolSize 可以获取当前线程数量)。 值得注意的是:当 cor 阅读全文
posted @ 2025-03-06 20:23
newbieking
阅读(12)
评论(0)
推荐(0)
摘要:
未重写Object的finalize方法 public static class MyObject { } 使用 PhantomReference 来监听引用是否被回收 ReferenceQueue<Object> queue = new ReferenceQueue<>(); MyObject o 阅读全文
posted @ 2025-03-05 11:57
newbieking
阅读(5)
评论(0)
推荐(0)