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

Issue 2149893002: Make StreamIterator not delay pausing between requests. (Closed)

Created:
4 years, 5 months ago by Lasse Reichstein Nielsen
Modified:
4 years, 2 months ago
Reviewers:
floitsch
CC:
reviews_dartlang.org, siva, sra1
Base URL:
https://github.com/dart-lang/sdk.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Make StreamIterator not delay pausing between requests. The current implementation of StreamIterator has a one-element buffer which allows it listen for the next even eagerly, and only pause if consumption doesn't keep up with production. However, StreamIterator is also used by both VM and dart2js implementations of "await for", and according to the specification, the iterated stream must be paused between loop iterations. The CL removes the one-element buffer and forces a pause after each event. R=floitsch@google.com Committed: https://github.com/dart-lang/sdk/commit/caf208a54381ddaafb00d4f8b2910f7583e5faca

Patch Set 1 #

Total comments: 1

Patch Set 2 : #

Patch Set 3 : Avoid pausing if moveNext is called immediately in response to the event. #

Patch Set 4 : Remove VM changes, not compatible with later changes, update streamiterator. #

Total comments: 2

Patch Set 5 : Address comment. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+142 lines, -153 lines) Patch
M sdk/lib/async/stream.dart View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M sdk/lib/async/stream_impl.dart View 1 2 3 4 4 chunks +104 lines, -150 lines 0 comments Download
A tests/language/async_star_pause_test.dart View 1 2 3 1 chunk +32 lines, -0 lines 0 comments Download
M tests/language/async_star_test.dart View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M tests/language/language.status View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 12 (2 generated)
Lasse Reichstein Nielsen
4 years, 5 months ago (2016-07-14 07:09:32 UTC) #2
floitsch
LGTM. https://codereview.chromium.org/2149893002/diff/1/sdk/lib/async/stream_impl.dart File sdk/lib/async/stream_impl.dart (right): https://codereview.chromium.org/2149893002/diff/1/sdk/lib/async/stream_impl.dart#newcode957 sdk/lib/async/stream_impl.dart:957: return _stateData; Please make sure that this is ...
4 years, 5 months ago (2016-07-14 13:29:25 UTC) #3
floitsch
On 2016/07/14 13:29:25, floitsch wrote: > LGTM. > > https://codereview.chromium.org/2149893002/diff/1/sdk/lib/async/stream_impl.dart > File sdk/lib/async/stream_impl.dart (right): > ...
4 years, 5 months ago (2016-07-14 13:32:01 UTC) #4
Lasse Reichstein Nielsen
On 2016/07/14 13:32:01, floitsch wrote: > > Please make sure that this is still strong-mode ...
4 years, 5 months ago (2016-07-14 13:49:58 UTC) #5
Lasse Reichstein Nielsen
Interestingly this only fixes the yield-problem for dart2js, the VM is unaffected. I'll dig deeper.
4 years, 5 months ago (2016-07-14 14:31:22 UTC) #6
Lasse Reichstein Nielsen
PTAL
4 years, 3 months ago (2016-09-23 10:53:39 UTC) #7
floitsch
LGTM. https://codereview.chromium.org/2149893002/diff/60001/sdk/lib/async/stream_impl.dart File sdk/lib/async/stream_impl.dart (right): https://codereview.chromium.org/2149893002/diff/60001/sdk/lib/async/stream_impl.dart#newcode916 sdk/lib/async/stream_impl.dart:916: * Pauses the stream between calles to [moveNext]. ...
4 years, 3 months ago (2016-09-23 14:10:09 UTC) #8
Lasse Reichstein Nielsen
https://codereview.chromium.org/2149893002/diff/60001/sdk/lib/async/stream_impl.dart File sdk/lib/async/stream_impl.dart (right): https://codereview.chromium.org/2149893002/diff/60001/sdk/lib/async/stream_impl.dart#newcode916 sdk/lib/async/stream_impl.dart:916: * Pauses the stream between calles to [moveNext]. On ...
4 years, 2 months ago (2016-09-26 07:25:24 UTC) #9
Lasse Reichstein Nielsen
4 years, 2 months ago (2016-09-26 07:25:25 UTC) #10
Lasse Reichstein Nielsen
4 years, 2 months ago (2016-09-26 07:35:55 UTC) #12
Message was sent while issue was closed.
Committed patchset #5 (id:80001) manually as
caf208a54381ddaafb00d4f8b2910f7583e5faca (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698