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

Issue 1010433002: Assorted fixes to async: yield may suspend in async* methods; yield* skips emptysequences; definiti… (Closed)

Created:
5 years, 9 months ago by gbracha
Modified:
5 years, 9 months ago
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Assorted fixes to async: yield may suspend in async* methods; yield* skips emptysequences; definition of flatten. R=hausner@google.com, paulberry@google.com Committed: https://code.google.com/p/dart/source/detail?r=44569

Patch Set 1 #

Total comments: 17

Patch Set 2 : #

Patch Set 3 : #

Total comments: 2

Patch Set 4 : #

Total comments: 1

Patch Set 5 : #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+56 lines, -18 lines) Patch
M docs/language/dartLangSpec.tex View 1 2 3 4 6 chunks +56 lines, -18 lines 1 comment Download

Messages

Total messages: 18 (1 generated)
gbracha
A bunch of clarifications and corrections to the async specs in light of discussions these ...
5 years, 9 months ago (2015-03-13 19:47:27 UTC) #2
Paul Berry
https://codereview.chromium.org/1010433002/diff/1/docs/language/dartLangSpec.tex File docs/language/dartLangSpec.tex (right): https://codereview.chromium.org/1010433002/diff/1/docs/language/dartLangSpec.tex#newcode3095 docs/language/dartLangSpec.tex:3095: is $(T_1 \ldots, T_n, [T_{n+1}$ $x_{n+1}, \ldots, T_{n+k}$ $x_{n+k}]) ...
5 years, 9 months ago (2015-03-13 19:59:11 UTC) #3
hausner
Changes to yield in async* LGTM.
5 years, 9 months ago (2015-03-13 20:21:34 UTC) #4
Lasse Reichstein Nielsen
https://codereview.chromium.org/1010433002/diff/1/docs/language/dartLangSpec.tex File docs/language/dartLangSpec.tex (right): https://codereview.chromium.org/1010433002/diff/1/docs/language/dartLangSpec.tex#newcode3095 docs/language/dartLangSpec.tex:3095: is $(T_1 \ldots, T_n, [T_{n+1}$ $x_{n+1}, \ldots, T_{n+k}$ $x_{n+k}]) ...
5 years, 9 months ago (2015-03-15 11:53:16 UTC) #5
Paul Berry
https://codereview.chromium.org/1010433002/diff/1/docs/language/dartLangSpec.tex File docs/language/dartLangSpec.tex (right): https://codereview.chromium.org/1010433002/diff/1/docs/language/dartLangSpec.tex#newcode3100 docs/language/dartLangSpec.tex:3100: The sole exception to that would be a type ...
5 years, 9 months ago (2015-03-15 13:57:22 UTC) #6
gbracha
https://codereview.chromium.org/1010433002/diff/1/docs/language/dartLangSpec.tex File docs/language/dartLangSpec.tex (right): https://codereview.chromium.org/1010433002/diff/1/docs/language/dartLangSpec.tex#newcode3095 docs/language/dartLangSpec.tex:3095: is $(T_1 \ldots, T_n, [T_{n+1}$ $x_{n+1}, \ldots, T_{n+k}$ $x_{n+k}]) ...
5 years, 9 months ago (2015-03-16 20:25:23 UTC) #7
gbracha
PTAL. https://codereview.chromium.org/1010433002/diff/1/docs/language/dartLangSpec.tex File docs/language/dartLangSpec.tex (right): https://codereview.chromium.org/1010433002/diff/1/docs/language/dartLangSpec.tex#newcode5970 docs/language/dartLangSpec.tex:5970: \item \label{moveNext} The \cd{moveNext} method of $i$ is ...
5 years, 9 months ago (2015-03-16 22:21:40 UTC) #8
Paul Berry
https://codereview.chromium.org/1010433002/diff/40001/docs/language/dartLangSpec.tex File docs/language/dartLangSpec.tex (right): https://codereview.chromium.org/1010433002/diff/40001/docs/language/dartLangSpec.tex#newcode3105 docs/language/dartLangSpec.tex:3105: In any other circumstance, $flatten(T) = T$. I don't ...
5 years, 9 months ago (2015-03-17 01:51:52 UTC) #9
Lasse Reichstein Nielsen
https://codereview.chromium.org/1010433002/diff/1/docs/language/dartLangSpec.tex File docs/language/dartLangSpec.tex (right): https://codereview.chromium.org/1010433002/diff/1/docs/language/dartLangSpec.tex#newcode5971 docs/language/dartLangSpec.tex:5971: \item An element $x$ is extracted from $i$ and ...
5 years, 9 months ago (2015-03-17 07:11:21 UTC) #10
gbracha
On 2015/03/17 07:11:21, Lasse Reichstein Nielsen wrote: > https://codereview.chromium.org/1010433002/diff/1/docs/language/dartLangSpec.tex > File docs/language/dartLangSpec.tex (right): > > ...
5 years, 9 months ago (2015-03-17 23:40:53 UTC) #11
gbracha
On 2015/03/17 01:51:52, Paul Berry wrote: > https://codereview.chromium.org/1010433002/diff/40001/docs/language/dartLangSpec.tex > File docs/language/dartLangSpec.tex (right): > > https://codereview.chromium.org/1010433002/diff/40001/docs/language/dartLangSpec.tex#newcode3105 ...
5 years, 9 months ago (2015-03-18 00:16:52 UTC) #12
gbracha
5 years, 9 months ago (2015-03-18 00:17:02 UTC) #13
Paul Berry
On 2015/03/18 00:16:52, gbracha wrote: > On 2015/03/17 01:51:52, Paul Berry wrote: > > > ...
5 years, 9 months ago (2015-03-18 02:09:12 UTC) #14
gbracha
Ok, I've tried to addressed all comments. Tomorrow is the TC52 meeting; after that I ...
5 years, 9 months ago (2015-03-18 19:41:12 UTC) #15
Paul Berry
Revised definition of flatten() LGTM. Thanks! https://codereview.chromium.org/1010433002/diff/60001/docs/language/dartLangSpec.tex File docs/language/dartLangSpec.tex (right): https://codereview.chromium.org/1010433002/diff/60001/docs/language/dartLangSpec.tex#newcode3114 docs/language/dartLangSpec.tex:3114: The exception to ...
5 years, 9 months ago (2015-03-18 21:05:53 UTC) #16
gbracha
Committed patchset #5 (id:80001) manually as r44569 (presubmit successful).
5 years, 9 months ago (2015-03-18 23:18:15 UTC) #17
Lasse Reichstein Nielsen
5 years, 9 months ago (2015-03-19 09:14:57 UTC) #18
Message was sent while issue was closed.
https://codereview.chromium.org/1010433002/diff/80001/docs/language/dartLangS...
File docs/language/dartLangSpec.tex (right):

https://codereview.chromium.org/1010433002/diff/80001/docs/language/dartLangS...
docs/language/dartLangSpec.tex:5876: If $s_E$ is an asynchronous for loop
(\ref{asynchronousFor-in}), its associated stream subscription is canceled.
Furthermore, let $a_k$ be the set of asynchronous for loops  and yield-each
statements (\ref{yieldEach}) enclosing $s_b$ that are enclosed in $s_E , 1 \le k
\le m$.   The stream subscriptions associated with $a_j$ are canceled, $1 \le j
\le m$.
Just noticed: When the stream subscription is canceled, the call to
subscription.cancel may return a future. 
If so, the implementation should wait for that future to complete before
continuing with the code outside the loop.

If the stream is created using async*, cancel always returns a future containing
the result of the stream cleanup (execution of the finally blocks that the yield
transferred control to when it noticed that it was canceled). Manually created
streams may also return a future that tells you when clean-up is done.
It is important to wait for that future before continuing.

Also, when canceling multiple subscriptions, they should be canceled from the
inside out, and each one should be waited on before the next one is canceled.

Same goes for continue and the handlers hit by return/throw.

Powered by Google App Engine
This is Rietveld 408576698