1.ThreadLocal用例
2.说明
Thread中维护threadLocalMap
ThreadLocal.ThreadLocalMap threadLocals = null;
如需share父线程的变量,请使用InheritableThreadLocal,对应Thread中维护的
ThreadLocal.ThreadLocalMap inheritableThreadLocals=null;
1.ThreadLocal用例
2.说明
Thread中维护threadLocalMap
ThreadLocal.ThreadLocalMap threadLocals = null;
如需share父线程的变量,请使用InheritableThreadLocal,对应Thread中维护的
ThreadLocal.ThreadLocalMap inheritableThreadLocals=null;