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

Issue 11887016: Make StreamController's unnamed constructor create a single-sub stream. (Closed)

Created:
7 years, 11 months ago by Lasse Reichstein Nielsen
Modified:
7 years, 11 months ago
Reviewers:
floitsch
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Make StreamController's unnamed constructor create a single-sub stream. R=floitsch@google.com Committed: https://code.google.com/p/dart/source/detail?r=17049

Patch Set 1 #

Total comments: 7

Patch Set 2 : Address comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+118 lines, -77 lines) Patch
M pkg/http/lib/src/multipart_request.dart View 1 chunk +1 line, -1 line 0 comments Download
M pkg/http/lib/src/streamed_request.dart View 1 chunk +1 line, -1 line 0 comments Download
M pkg/http/lib/src/utils.dart View 1 3 chunks +4 lines, -4 lines 0 comments Download
M pkg/http/test/mock_client_test.dart View 1 chunk +1 line, -1 line 0 comments Download
M pkg/http/test/multipart_test.dart View 2 chunks +2 lines, -2 lines 0 comments Download
M pkg/http/test/response_test.dart View 2 chunks +2 lines, -2 lines 0 comments Download
M sdk/lib/async/stream.dart View 1 1 chunk +40 lines, -0 lines 0 comments Download
M sdk/lib/async/stream_controller.dart View 1 2 chunks +2 lines, -2 lines 0 comments Download
M sdk/lib/async/stream_pipe.dart View 1 1 chunk +2 lines, -4 lines 0 comments Download
M sdk/lib/isolate/isolate_stream.dart View 1 chunk +1 line, -1 line 0 comments Download
M tests/lib/async/merge_stream_test.dart View 7 chunks +21 lines, -21 lines 0 comments Download
M tests/lib/async/stream_controller_async_test.dart View 7 chunks +9 lines, -9 lines 0 comments Download
M tests/lib/async/stream_controller_test.dart View 22 chunks +23 lines, -23 lines 0 comments Download
M tests/lib/async/stream_single_test.dart View 1 chunk +1 line, -1 line 0 comments Download
M tests/lib/async/stream_single_to_multi_subscriber_test.dart View 3 chunks +3 lines, -3 lines 0 comments Download
M utils/pub/io.dart View 1 1 chunk +5 lines, -2 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Lasse Reichstein Nielsen
7 years, 11 months ago (2013-01-14 13:47:16 UTC) #1
floitsch
LGTM. https://codereview.chromium.org/11887016/diff/1/sdk/lib/async/stream.dart File sdk/lib/async/stream.dart (right): https://codereview.chromium.org/11887016/diff/1/sdk/lib/async/stream.dart#newcode20 sdk/lib/async/stream.dart:20: * again, or to temporarily pause events from ...
7 years, 11 months ago (2013-01-14 16:42:45 UTC) #2
Lasse Reichstein Nielsen
7 years, 11 months ago (2013-01-15 09:08:54 UTC) #3
https://codereview.chromium.org/11887016/diff/1/sdk/lib/async/stream.dart
File sdk/lib/async/stream.dart (right):

https://codereview.chromium.org/11887016/diff/1/sdk/lib/async/stream.dart#new...
sdk/lib/async/stream.dart:20: * again, or to temporarily pause events from the
stream.
On 2013/01/14 16:42:45, floitsch wrote:
> -again- (remove)

Done.

https://codereview.chromium.org/11887016/diff/1/sdk/lib/async/stream.dart#new...
sdk/lib/async/stream.dart:23: * If a listener is added or removed while an event
is being fired, the change
I haven't talked about "subscriptions" as a concept at this point, and I try not
to.
Which might be silly because we do it everywhere else.

https://codereview.chromium.org/11887016/diff/1/sdk/lib/async/stream.dart#new...
sdk/lib/async/stream.dart:23: * If a listener is added or removed while an event
is being fired, the change
On 2013/01/14 16:42:45, floitsch wrote:
> maybe?
> Subscription changes while an event is fired are queued and handled after the
> event has been treated.

Also, not *really* true because subscriptions are dropped just before their done
event is sent.

https://codereview.chromium.org/11887016/diff/1/sdk/lib/async/stream.dart#new...
sdk/lib/async/stream.dart:26: * Streams always buffer events that come in while
the Stream is paused, and
On 2013/01/14 16:42:45, floitsch wrote:
> I wouldn't say this. Rather:
> Streams always respect "pause" requests. If necessary they need to buffer
their
> input, but often, and preferably, they can simply request their input to
pause.

Done.

Powered by Google App Engine
This is Rietveld 408576698