Skip to content

Conversation

@timfish
Copy link
Collaborator

@timfish timfish commented Apr 6, 2023

This PR extends runWithAsyncContext on AsyncContextStrategy to allow reuse of existing context rather than creating a new sub-context.

I've also added more jsdocs since the functions are getting more complex.

@timfish
Copy link
Collaborator Author

timfish commented Apr 6, 2023

Should we maybe make the arguments after the callback into an object to allow for non-breaking changes later?

@AbhiPrasad
Copy link
Member

Should we maybe make the arguments after the callback into an object to allow for non-breaking changes later?

Good idea, let's do it!

@AbhiPrasad AbhiPrasad enabled auto-merge (squash) April 6, 2023 15:44
@timfish
Copy link
Collaborator Author

timfish commented Apr 6, 2023

Oops, this is currently incorrect.

If we want to reuse an existing domain/context, we can just call the callback

@AbhiPrasad AbhiPrasad merged commit 715876b into getsentry:develop Apr 6, 2023
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.

2 participants