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

Simplify DefaultScopedContextProvider #2450

Closed
wants to merge 2 commits into from

Conversation

ppkarwasz
Copy link
Contributor

This PR simplifies the logic of DefaultScopedContextProvider, by using two kinds of ScopedContext.Instance implementations:

  • MapInstance is a simple container for an immutable map and is the only implementation that can be set in the ThreadLocal,
  • KeyValueInstance represents a node of a linked list of key/value pairs. It is used to record differences from a MapInstance and is converted into a MapInstance in the wrap methods.

@ppkarwasz ppkarwasz mentioned this pull request Apr 8, 2024
@ppkarwasz ppkarwasz requested a review from rgoers April 8, 2024 19:54
@ppkarwasz
Copy link
Contributor Author

I closed it, since a similar solution appeared in #2438

@ppkarwasz ppkarwasz closed this Apr 12, 2024
@ppkarwasz ppkarwasz deleted the ScopedContext-simplify branch April 12, 2024 10:08
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

Successfully merging this pull request may close these issues.

None yet

1 participant