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
Async generator stream is not closed if cancelled #25967
Comments
The same problem is observed if |
When you call It might not be clear enough from the |
Is there a way to find out the state of the |
A The There is no way to inspect the subscription to see which state it is in, the user is expected to keep track the state of the subscriptions they have control of. |
It seems to me that either the spec should be changed or the implementations in the vm and dart2js should be changed. Please label this with vm and dart2js and spec, and explain in more detail what the problem is and what the solutions could be. |
Reading this again - I think everybody is acting correctly, but the documentation should be improved. You only get an |
Addresses issue #25967 BUG= http://dartbug.com/25967 R=floitsch@google.com Review URL: https://codereview.chromium.org/2119153002.
Dart Programming Language Specification (4th edition draft) version 1.11 chapter 16.14 Function Invocation reads:
Please, note, that according to the specification s is closed in all cases.
The description for method
Stream.listen()
https://api.dartlang.org/1.14.2/dart-async/Stream/listen.html reads:Here is the sample code that demonstrates the problem:
Output:
Expected output:
Dart VM version: 1.14.2 (Tue Feb 09 15:17:24 2016) on "windows_x64"
The text was updated successfully, but these errors were encountered: