Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(81)

Issue 1683763002: Cancel async generator only when it yields (Closed)

Created:
4 years, 10 months ago by hausner
Modified:
4 years, 10 months ago
Reviewers:
floitsch
CC:
reviews_dartlang.org, vm-dev_dartlang.org, Florian Schneider, Lasse Reichstein Nielsen
Base URL:
https://github.com/dart-lang/sdk.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Cancel 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 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+7 lines, -2 lines) Patch
M runtime/lib/async_patch.dart View 1 2 chunks +7 lines, -2 lines 0 comments Download

Messages

Total messages: 7 (3 generated)
hausner
4 years, 10 months ago (2016-02-09 18:21:04 UTC) #3
floitsch
LGTM. Tests will come with my CL (https://chromiumcodereview.appspot.com/1677063003/) Please make sure that they pass (and ...
4 years, 10 months ago (2016-02-09 18:23:31 UTC) #4
hausner
Committed patchset #2 (id:20001) manually as 4b6ef00d5996471274a1e685eb32c55419482cf7 (presubmit successful).
4 years, 10 months ago (2016-02-09 18:45:20 UTC) #6
hausner
4 years, 10 months ago (2016-02-09 18:47:07 UTC) #7
Message was sent while issue was closed.
Your new tests pass. Thank you for the review and the tests.

Powered by Google App Engine
This is Rietveld 408576698