Skip to content

Simplify DefaultScopedContextProvider#2450

Closed
ppkarwasz wants to merge 2 commits intoScopedContextfrom
ScopedContext-simplify
Closed

Simplify DefaultScopedContextProvider#2450
ppkarwasz wants to merge 2 commits intoScopedContextfrom
ScopedContext-simplify

Conversation

@ppkarwasz
Copy link
Copy Markdown
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
Copy Markdown
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.

1 participant