Chromium Code Reviews
DescriptionCancel async generator only when it yields
Async generators should only react to a cancellation when they
yield a value. Otherwise, the cancellation is ignored.
The example in dartbug.com/23436 should therefore never terminate,
because the generator function contains no yield statement.
This CL fixes bug 23436 by implementing the expected behavior, i.e.
not terminating the generator. If a yield statement is added to the
generator, the finally clause is executed once only, as expected.
BUG=23436
R=floitsch@google.com
Committed: https://github.com/dart-lang/sdk/commit/4b6ef00d5996471274a1e685eb32c55419482cf7
Patch Set 1 #Patch Set 2 : #Messages
Total messages: 7 (3 generated)
|