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

Issue 14753009: Make StreamSubscription be the active part of a stream. (Closed)

Created:
7 years, 7 months ago by Lasse Reichstein Nielsen
Modified:
7 years, 7 months ago
CC:
reviews_dartlang.org, Jennifer Messerly
Visibility:
Public.

Description

Make StreamSubscription be the active part of a stream. It is the one keeping the buffer of events, not the stream. R=ajohnsen@google.com, floitsch@google.com, jmesserly@google.com Committed: https://code.google.com/p/dart/source/detail?r=23204

Patch Set 1 #

Patch Set 2 : Added StreamIterator #

Patch Set 3 : Made tests run (mostly) #

Total comments: 108

Patch Set 4 : Addressed comments. May have introduced more bugs. #

Patch Set 5 : Address comments. #

Total comments: 7

Patch Set 6 : Remove new bugs. #

Patch Set 7 : Setting pause in http could not be omitted. #

Patch Set 8 : Fixed pub test. The previous "fix" was at the wrong point. #

Patch Set 9 : Make it work in dart2js too. #

Patch Set 10 : Remove remaining debugging prints. #

Total comments: 20

Patch Set 11 : Make StreamIterator not pause as often. #

Patch Set 12 : Made StreamIterator not pause so much. #

Patch Set 13 : Addressed comments. #

Total comments: 12

Patch Set 14 : Dont mention the _data. #

Total comments: 1

Patch Set 15 : Address comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1439 lines, -1534 lines) Patch
M pkg/scheduled_test/lib/scheduled_process.dart View 1 2 3 4 5 6 7 8 9 10 11 12 13 6 chunks +8 lines, -9 lines 0 comments Download
M pkg/scheduled_test/lib/src/mock_clock.dart View 1 2 3 4 5 2 chunks +27 lines, -11 lines 0 comments Download
M pkg/scheduled_test/lib/src/utils.dart View 1 2 3 4 1 chunk +31 lines, -20 lines 0 comments Download
M runtime/bin/socket_patch.dart View 1 2 3 4 5 6 7 2 chunks +1 line, -5 lines 0 comments Download
M sdk/lib/_internal/pub/lib/src/error_group.dart View 1 2 1 chunk +1 line, -1 line 0 comments Download
M sdk/lib/_internal/pub/test/error_group_test.dart View 1 2 3 4 5 6 7 5 chunks +26 lines, -13 lines 0 comments Download
M sdk/lib/async/stream.dart View 1 2 3 4 5 6 7 8 9 10 10 chunks +84 lines, -69 lines 0 comments Download
M sdk/lib/async/stream_controller.dart View 1 2 3 4 5 6 7 8 9 4 chunks +151 lines, -39 lines 0 comments Download
M sdk/lib/async/stream_impl.dart View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 7 chunks +862 lines, -1013 lines 0 comments Download
M sdk/lib/async/stream_pipe.dart View 1 2 3 13 chunks +59 lines, -131 lines 0 comments Download
M sdk/lib/io/http_impl.dart View 1 2 3 4 5 6 7 1 chunk +3 lines, -1 line 0 comments Download
M sdk/lib/io/http_parser.dart View 1 2 1 chunk +0 lines, -8 lines 0 comments Download
M sdk/lib/io/mime_multipart_parser.dart View 1 2 2 chunks +4 lines, -8 lines 0 comments Download
M sdk/lib/mdv_observe_impl/mdv_observe_impl.dart View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +21 lines, -7 lines 0 comments Download
M tests/lib/async/stream_controller_async_test.dart View 1 2 3 4 5 6 7 8 9 10 2 chunks +0 lines, -49 lines 0 comments Download
M tests/lib/async/stream_state_helper.dart View 1 13 chunks +101 lines, -43 lines 0 comments Download
M tests/lib/async/stream_state_nonzero_timer_test.dart View 1 3 chunks +22 lines, -22 lines 0 comments Download
M tests/lib/async/stream_state_test.dart View 1 4 chunks +12 lines, -59 lines 0 comments Download
M tests/standalone/io/http_multipart_test.dart View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M tests/standalone/io/http_parser_test.dart View 1 2 2 chunks +20 lines, -14 lines 0 comments Download
tests/standalone/io/http_redirect_test.dart View 1 2 1 chunk +5 lines, -9 lines 0 comments Download
M tests/standalone/io/pipe_server_test.dart View 1 2 3 4 5 1 chunk +0 lines, -1 line 0 comments Download
M tests/standalone/io/regress_8828_test.dart View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 23 (0 generated)
Lasse Reichstein Nielsen
FYI, not done yet.
7 years, 7 months ago (2013-05-08 12:29:30 UTC) #1
Lasse Reichstein Nielsen
This is getting close to working. Notice that you can no longer listen on a ...
7 years, 7 months ago (2013-05-22 12:53:38 UTC) #2
Lasse Reichstein Nielsen
Please take looks.
7 years, 7 months ago (2013-05-22 12:56:08 UTC) #3
Anders Johnsen
IO stuff LGTM https://codereview.chromium.org/14753009/diff/6001/runtime/bin/socket_patch.dart File runtime/bin/socket_patch.dart (right): https://codereview.chromium.org/14753009/diff/6001/runtime/bin/socket_patch.dart#newcode812 runtime/bin/socket_patch.dart:812: assert(!!!paused); !!!? https://codereview.chromium.org/14753009/diff/6001/runtime/bin/socket_patch.dart#newcode850 runtime/bin/socket_patch.dart:850: if (subscription ...
7 years, 7 months ago (2013-05-22 13:07:08 UTC) #4
Bob Nystrom
Added Nathan to review the scheduled_test stuff too. https://codereview.chromium.org/14753009/diff/6001/pkg/scheduled_test/lib/scheduled_process.dart File pkg/scheduled_test/lib/scheduled_process.dart (right): https://codereview.chromium.org/14753009/diff/6001/pkg/scheduled_test/lib/scheduled_process.dart#newcode250 pkg/scheduled_test/lib/scheduled_process.dart:250: } ...
7 years, 7 months ago (2013-05-22 16:23:46 UTC) #5
floitsch
Still need to look at the test changes, but so far LGTM. https://codereview.chromium.org/14753009/diff/6001/pkg/scheduled_test/lib/scheduled_process.dart File pkg/scheduled_test/lib/scheduled_process.dart ...
7 years, 7 months ago (2013-05-22 16:26:29 UTC) #6
nweiz
https://codereview.chromium.org/14753009/diff/6001/pkg/scheduled_test/lib/scheduled_process.dart File pkg/scheduled_test/lib/scheduled_process.dart (right): https://codereview.chromium.org/14753009/diff/6001/pkg/scheduled_test/lib/scheduled_process.dart#newcode42 pkg/scheduled_test/lib/scheduled_process.dart:42: StreamIterator<String> _stdout; I'm not sure I understand why using ...
7 years, 7 months ago (2013-05-22 18:42:41 UTC) #7
floitsch
https://codereview.chromium.org/14753009/diff/6001/pkg/scheduled_test/lib/scheduled_process.dart File pkg/scheduled_test/lib/scheduled_process.dart (right): https://codereview.chromium.org/14753009/diff/6001/pkg/scheduled_test/lib/scheduled_process.dart#newcode42 pkg/scheduled_test/lib/scheduled_process.dart:42: StreamIterator<String> _stdout; On 2013/05/22 18:42:41, nweiz wrote: > I'm ...
7 years, 7 months ago (2013-05-22 20:23:35 UTC) #8
floitsch
https://codereview.chromium.org/14753009/diff/6001/tests/lib/async/stream_state_nonzero_timer_test.dart File tests/lib/async/stream_state_nonzero_timer_test.dart (right): https://codereview.chromium.org/14753009/diff/6001/tests/lib/async/stream_state_nonzero_timer_test.dart#newcode84 tests/lib/async/stream_state_nonzero_timer_test.dart:84: return; spurious 'return'. https://codereview.chromium.org/14753009/diff/23001/pkg/scheduled_test/lib/scheduled_process.dart File pkg/scheduled_test/lib/scheduled_process.dart (right): https://codereview.chromium.org/14753009/diff/23001/pkg/scheduled_test/lib/scheduled_process.dart#newcode243 pkg/scheduled_test/lib/scheduled_process.dart:243: ...
7 years, 7 months ago (2013-05-23 18:38:22 UTC) #9
Lasse Reichstein Nielsen
https://codereview.chromium.org/14753009/diff/6001/pkg/scheduled_test/lib/scheduled_process.dart File pkg/scheduled_test/lib/scheduled_process.dart (right): https://codereview.chromium.org/14753009/diff/6001/pkg/scheduled_test/lib/scheduled_process.dart#newcode42 pkg/scheduled_test/lib/scheduled_process.dart:42: StreamIterator<String> _stdout; Exactly. The current code subscribed to the ...
7 years, 7 months ago (2013-05-24 06:02:48 UTC) #10
Lasse Reichstein Nielsen
All tests run. Working in dart2js too. Had to change ObserveMixin to avoid listening twice ...
7 years, 7 months ago (2013-05-24 11:13:29 UTC) #11
floitsch
https://codereview.chromium.org/14753009/diff/6001/sdk/lib/_internal/pub/test/error_group_test.dart File sdk/lib/_internal/pub/test/error_group_test.dart (right): https://codereview.chromium.org/14753009/diff/6001/sdk/lib/_internal/pub/test/error_group_test.dart#newcode220 sdk/lib/_internal/pub/test/error_group_test.dart:220: expect(iter.moveNext(), completion(isFalse)); On 2013/05/24 06:02:49, Lasse Reichstein Nielsen wrote: ...
7 years, 7 months ago (2013-05-24 13:53:41 UTC) #12
floitsch
LGTM. https://codereview.chromium.org/14753009/diff/44002/pkg/scheduled_test/lib/src/mock_clock.dart File pkg/scheduled_test/lib/src/mock_clock.dart (right): https://codereview.chromium.org/14753009/diff/44002/pkg/scheduled_test/lib/src/mock_clock.dart#newcode51 pkg/scheduled_test/lib/src/mock_clock.dart:51: Set<StreamController> _subscriptions = new Set<StreamController>(); Add TODO that ...
7 years, 7 months ago (2013-05-24 15:53:17 UTC) #13
Bob Nystrom
https://codereview.chromium.org/14753009/diff/6001/pkg/scheduled_test/lib/scheduled_process.dart File pkg/scheduled_test/lib/scheduled_process.dart (right): https://codereview.chromium.org/14753009/diff/6001/pkg/scheduled_test/lib/scheduled_process.dart#newcode273 pkg/scheduled_test/lib/scheduled_process.dart:273: return streamIterator.moveNext().then((bool hasNext) { On 2013/05/24 06:02:49, Lasse Reichstein ...
7 years, 7 months ago (2013-05-24 15:54:37 UTC) #14
Jennifer Messerly
MDV changes lgtm https://codereview.chromium.org/14753009/diff/44002/sdk/lib/mdv_observe_impl/mdv_observe_impl.dart File sdk/lib/mdv_observe_impl/mdv_observe_impl.dart (right): https://codereview.chromium.org/14753009/diff/44002/sdk/lib/mdv_observe_impl/mdv_observe_impl.dart#newcode97 sdk/lib/mdv_observe_impl/mdv_observe_impl.dart:97: // TODO(jmesserly): make "changes" immutable keep ...
7 years, 7 months ago (2013-05-24 18:47:55 UTC) #15
nweiz
https://codereview.chromium.org/14753009/diff/6001/pkg/scheduled_test/lib/scheduled_process.dart File pkg/scheduled_test/lib/scheduled_process.dart (right): https://codereview.chromium.org/14753009/diff/6001/pkg/scheduled_test/lib/scheduled_process.dart#newcode42 pkg/scheduled_test/lib/scheduled_process.dart:42: StreamIterator<String> _stdout; On 2013/05/24 06:02:49, Lasse Reichstein Nielsen wrote: ...
7 years, 7 months ago (2013-05-24 20:12:30 UTC) #16
floitsch
https://codereview.chromium.org/14753009/diff/44002/pkg/scheduled_test/lib/src/mock_clock.dart File pkg/scheduled_test/lib/src/mock_clock.dart (right): https://codereview.chromium.org/14753009/diff/44002/pkg/scheduled_test/lib/src/mock_clock.dart#newcode65 pkg/scheduled_test/lib/src/mock_clock.dart:65: return controller.stream; On 2013/05/24 20:12:31, nweiz wrote: > I'd ...
7 years, 7 months ago (2013-05-24 20:40:48 UTC) #17
nweiz
https://codereview.chromium.org/14753009/diff/44002/pkg/scheduled_test/lib/src/mock_clock.dart File pkg/scheduled_test/lib/src/mock_clock.dart (right): https://codereview.chromium.org/14753009/diff/44002/pkg/scheduled_test/lib/src/mock_clock.dart#newcode65 pkg/scheduled_test/lib/src/mock_clock.dart:65: return controller.stream; On 2013/05/24 20:40:48, floitsch wrote: > On ...
7 years, 7 months ago (2013-05-24 20:49:18 UTC) #18
Jennifer Messerly
few more comments on second look. https://codereview.chromium.org/14753009/diff/44002/sdk/lib/mdv_observe_impl/mdv_observe_impl.dart File sdk/lib/mdv_observe_impl/mdv_observe_impl.dart (right): https://codereview.chromium.org/14753009/diff/44002/sdk/lib/mdv_observe_impl/mdv_observe_impl.dart#newcode72 sdk/lib/mdv_observe_impl/mdv_observe_impl.dart:72: _observers = new ...
7 years, 7 months ago (2013-05-24 23:28:08 UTC) #19
Lasse Reichstein Nielsen
PTAL https://codereview.chromium.org/14753009/diff/6001/pkg/scheduled_test/lib/scheduled_process.dart File pkg/scheduled_test/lib/scheduled_process.dart (right): https://codereview.chromium.org/14753009/diff/6001/pkg/scheduled_test/lib/scheduled_process.dart#newcode42 pkg/scheduled_test/lib/scheduled_process.dart:42: StreamIterator<String> _stdout; On 2013/05/24 20:12:31, nweiz wrote: > ...
7 years, 7 months ago (2013-05-27 08:04:53 UTC) #20
floitsch
LGTM. https://codereview.chromium.org/14753009/diff/68001/sdk/lib/async/stream_impl.dart File sdk/lib/async/stream_impl.dart (right): https://codereview.chromium.org/14753009/diff/68001/sdk/lib/async/stream_impl.dart#newcode399 sdk/lib/async/stream_impl.dart:399: * After ing, no further callbacks will happen. ...
7 years, 7 months ago (2013-05-27 08:24:43 UTC) #21
Lasse Reichstein Nielsen
https://codereview.chromium.org/14753009/diff/68001/sdk/lib/async/stream_impl.dart File sdk/lib/async/stream_impl.dart (right): https://codereview.chromium.org/14753009/diff/68001/sdk/lib/async/stream_impl.dart#newcode399 sdk/lib/async/stream_impl.dart:399: * After ing, no further callbacks will happen. On ...
7 years, 7 months ago (2013-05-27 08:33:44 UTC) #22
Lasse Reichstein Nielsen
7 years, 7 months ago (2013-05-27 08:34:38 UTC) #23
Message was sent while issue was closed.
Committed patchset #15 manually as r23204 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698