摘要: ThreadLocal ThreadLocal 适用于每个线程需要自己独立的实例且该实例需要在多个方法中被使用,也即变量在线程间隔离而在方法或类间共享的场景。 ThreadLocal的set方法源码 /** * Sets the current thread's copy of this threa 阅读全文
posted @ 2021-02-16 16:27 January01 阅读(79) 评论(0) 推荐(0)