You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2020/12/24 04:49:06 UTC
[GitHub] [skywalking] beijingzhangwei opened a new issue #6072: About TraceCrossThread ,think how to transport my threadLocal variables
beijingzhangwei opened a new issue #6072:
URL: https://github.com/apache/skywalking/issues/6072
Please answer these questions before submitting your issue.
- Why do you submit this issue?
- [ ] Question or discussion
___
### Question
- In SW i use TraceCrossThread make trace across thread. But I also want transport my threadLocal variables through threads, here i make a nest wrapper callable ,like this :
Future<List<Users>> operationFuture = pool.submit(CallableWrapper.of(new ThreadLocalCallable(userWrapper::doRecall)));
when ThreadLocalCallable construct method was called, i record the threadLocal variables ,then when userWrapper::doRecall was called i set the threadLocal variables to the work thread context, so in doRecall method it can access the threadLocal variables.
I want to known ,is there a better way to transport the threadLocal variables in SW? or should another annotation to permit transport threadLocal variables ?
![image](https://user-images.githubusercontent.com/11971162/103061387-2d50d980-45e6-11eb-81de-d46c64d0f1e2.png)
[](url)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking] wu-sheng closed issue #6072: About TraceCrossThread ,think how to transport my threadLocal variables
Posted by GitBox <gi...@apache.org>.
wu-sheng closed issue #6072:
URL: https://github.com/apache/skywalking/issues/6072
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking] wu-sheng commented on issue #6072: About TraceCrossThread ,think how to transport my threadLocal variables
Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #6072:
URL: https://github.com/apache/skywalking/issues/6072#issuecomment-750797119
I can't see there is the difference between the thing you described and native `TraceCrossThread`. If you are going to change source codes, what makes it better?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org