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

Remove ActionScope.threadLocalUUID #3188

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

JGulbronson
Copy link
Collaborator

@JGulbronson JGulbronson commented Mar 15, 2024

This shouldn't be merged until the deprecated ActionScope::enter method is deleted. Otherwise it will break existing callers who use a direct executor

This removes the ThreadLocal UUID and simplifies the code, fixing what I believe is an unintended behavior and a footgun. Currently you can overwrite your ActionScope seed data if you propagate an ActionScope to a "new" thread using a DirectExecutor. Because the UUID will match, it won't complain about being in an action scope and happily overwrite the thread local with the newly supplied seed data. Now that we have ActionScope.Instance, we can check for object equality and provide the safer guarantee that the scope you're propagating is the same as the current scope.

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

4 participants