-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
请教2个问题。1.关于restore方法 2.关于Snapshot类 #190
Comments
对于你这个具体场景,『省略 对于通用的场景(比如不是每次都设置的场景), PS: 相关/类似问题的Issue:
参见 Issue #155 Transmitter类中的变量threadLocalHolder有什么用
更多了解可以看一下
|
好的,看明白了,多谢! |
问题一:
我们使用ttl的场景是用来做链路追踪,每个request都会在当前线程生成一个trace id,存放进ttl里,进而传递给子线程。这种情况下似乎restore操作没有什么意义,是否可以省略restore操作?
问题二:
TransmittableThreadLocal.Transmitter.Snapshot这个类里,有2个属性,分别是ttl2Value和 threadLocal2Value。使用ttl时,都是围绕着备份和传递ttl2Value这个属性。这个时候,threadLocal2Value存在的意义是什么呢?
The text was updated successfully, but these errors were encountered: