-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Cannot cancel an IAsyncEnumerable #8958
Comments
Thank you for reporting. This is a good point. There needs to be a better way to accomplish this. I'll mark this as a feature enhancement for now. Ideally, we have a better way to flow cancellation along grain call chains in general. |
This is important to us, do you have a strategy for this in mind and if so, would you elaborate? If possible we'd like to contribute this feature. |
The feature needs design work - scenarios/requirements could help to drive the design. Lifetime/scope management for the cancellation is the biggest issue. Eg, do we support cancelling a captured
|
An unexpected behavior has been observed while working with IAsyncEnumerable and we try to cancel it.
A method returning an IAsyncEnumerable, which internally fetches data from the Channel, encounters no issues to be cancelled when there is data in it.
However, if the Channel is empty and the cancellation is requested, there is no execution of code block in the try/finally within the grain.
There is a demo repo to explain this problem in detail.
You'll find three branches detailing various attempts to resolve this issue during our testing phase:
We would greatly appreciate any assistance on this matter.
Thank you!
The text was updated successfully, but these errors were encountered: