📅  最后修改于: 2020-11-15 03:00:54             🧑  作者: Mango
java.lang.InheritableThreadLocal类将ThreadLocal扩展为提供从父线程到子线程的值的继承:创建子线程时,子级将接收父级具有值的所有可继承线程局部变量的初始值。
以下是java.lang.InheritableThreadLocal类的声明-
public class InheritableThreadLocal
extends ThreadLocal
S.N. | Constructor & Description |
---|---|
1 |
public class InheritableThreadLocal This is the Single Constructor. |
S.N. | Method & Description |
---|---|
1 |
protected T childValue(T parentValue) This method computes the child’s initial value for this inheritable thread-local variable as a function of the parent’s value at the time the child thread is created. |
此类从以下类继承方法-