-
-
Notifications
You must be signed in to change notification settings - Fork 734
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
Improve use of MDC #721
Improve use of MDC #721
Conversation
Now we use copies of the initial map in order to restore thread locality for MDC, in addition we now set MDC keys in the onThreadStart methods for websocket adapters
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also don't fully understand what most calls to setContextMap() do... I assume MDC is thread-specific?
{ | ||
return channel.getJDA(); | ||
return (JDAImpl) channel.getJDA(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't this be replaced with just return api;
? (see line 91)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No it can't be replaced with that, the api reference is local in the constructor.
# Conflicts: # src/main/java/net/dv8tion/jda/core/requests/RateLimiter.java # src/main/java/net/dv8tion/jda/core/requests/Requester.java
Pull Request Etiquette
There are several guidelines you should follow in order for your
Pull Request to be merged.
Description
Now we use copies of the initial map in order to restore thread locality
for MDC, in addition we now set MDC keys in the onThreadStart methods
for websocket adapters