Skip to content
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

Sample12 Async trace AsyncInitiatorInterceptor seems useless #34

Open
zlp1992 opened this issue Oct 27, 2020 · 1 comment
Open

Sample12 Async trace AsyncInitiatorInterceptor seems useless #34

zlp1992 opened this issue Oct 27, 2020 · 1 comment

Comments

@zlp1992
Copy link

zlp1992 commented Oct 27, 2020

Hi, In Sample12 async trace, it says we should intercept a method initiating an async task and create/record a new AsyncContext, so it intercepts TargetClass12_AsyncInitiator's method asyncHello then intercepts TargetClass12_Worker constructor method to get the AsyncContext passed by AsyncInitiatorInterceptor.
My question is why not create/record a new AsyncContext in the TargetClass12_Worker constructor method interceptor, since TargetClass12_Worker's constructor method is executed in current thread while it's run method executed in another thread, So we can remove AsyncInitiatorInterceptor.

@zlp1992
Copy link
Author

zlp1992 commented Nov 3, 2020

Anyone knows?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant