ThreadLocalMap引用其实是存在ThreadLocal类里面的
Entry实体 //Entry是一个key-value结构,key为ThreadLocal,value为存储的值 static class Entry extends WeakReference<ThreadLocal<?>> { /** The value associated with this ThreadLocal. */ Object value; Entry(ThreadLocal<?> k, Object v) { super(k); value = v; } } setInitialValue方法Java并发编程之ThreadLocal解析 (2)
内容版权声明:除非注明,否则皆为本站原创文章。