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

[Feature Request] Support IAsyncDisposable activity classws with async scopes for DI in .NET 6+ #204

Closed
cretz opened this issue Mar 15, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@cretz
Copy link
Member

cretz commented Mar 15, 2024

Describe the solution you'd like

Currently we don't support IAsyncDisposable instances of activity classes when using the Temporalio.Extensions.Hosting DI because we create synchronous scopes.

Change

using (var scope = provider.CreateScope())
to await using (var scope = provider.CreateAsyncScope()), but there may need to be compiler directives since it's .NET 6+ (and we may have to distribute a .NET-6-specific version of this library)

@cretz
Copy link
Member Author

cretz commented Mar 26, 2024

Handled with #207

@cretz cretz closed this as completed Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant