Skip to content

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.

@JGulbronson JGulbronson requested review from swankjesse and tyiu March 15, 2024 12:29
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.

4 participants