AsyncLocalScopeManager uses static for an instance variable
See original GitHub issueprivate static AsyncLocal<IScope> s_current = new AsyncLocal<IScope>();
If the user is using 2 tracers at the same time, both using an instance of AsyncLocalScopeManager underlying, then there is only 1 s_current
shared between both of these tracers. I believe this was meant to be a private readonly variable rather than static.
It’s minor, but conceivable that composite tracers may hit this problem.
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
c# - Is it possible to access an instance variable via a static ...
Yes, it is possible to access an instance variable from a static method without using a parameter but only if you can access...
Read more >Java Program to Check the Accessibility of an Instance ...
Static variables in Java belong to the class i.e it is initialized only once at the start of the execution. By using static...
Read more >Static Variables in Java – Why and How to Use ...
A static method means it can be called without creating an instance of the class. Static variables and methods in Java provide several ......
Read more >Static in Java: An Overview of Static Keyword With Examples
When you create an object or instance for a class in Java, each object will have its own copy of the members such...
Read more >Question - Static variables?
values the buttons use. Static variables are values where you only want one ever to exist. Regular variables mean that every time another...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I agree, but unless it’s impossible to do someone somewhere will do it and spend weeks debugging the errors 😄
I’ll work on tests and a change for it!
👍 I’m looking forward to learn more about how AsyncLocal works.