提交 f36a5f96 编写于 作者: oldratlee's avatar oldratlee 🔥

add readability note, since holder map is used as set

more discussion see #95
上级 f999bd97
......@@ -97,6 +97,10 @@ public class TransmittableThreadLocal<T> extends InheritableThreadLocal<T> {
return copy(get());
}
// Note about holder:
// 1. The value of holder is type Map<TransmittableThreadLocal<?>, ?> (WeakHashMap implementation),
// but it is used as *set*.
// 2. WeakHashMap support null value.
private static InheritableThreadLocal<Map<TransmittableThreadLocal<?>, ?>> holder =
new InheritableThreadLocal<Map<TransmittableThreadLocal<?>, ?>>() {
@Override
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册