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

Issue 1149563010: Add new features to package:async. (Closed)

Created:
5 years, 6 months ago by Lasse Reichstein Nielsen
Modified:
5 years, 5 months ago
Reviewers:
nweiz, Søren Gjesse, kevmoo
CC:
reviews_dartlang.org, ahe, floitsch
Base URL:
https://github.com/dart-lang/async@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Add new features to package:async. - `DelegatingStreamSubscription`: Wrap a subscription and maybe override some methods. - `SubscriptionStream`: Rewrap a stream subscription as a single-subscription stream. - `StreamCompleter`: Utility to help when avoiding returning a `Future<Stream>`. - `StreamEvents`: A pull interface for reading the events of a stream. R=nweiz@google.com, sgjesse@google.com Committed: https://github.com/dart-lang/async/commit/dc58de5505ed02563370f03f7f17377f2bfc9e98

Patch Set 1 #

Total comments: 4

Patch Set 2 : Allow skip/take with 0 as argument. #

Patch Set 3 : more docs and tests. #

Total comments: 239

Patch Set 4 : Partially address comments, doesn't run yet. #

Patch Set 5 : Address remaining comments. #

Total comments: 24

Patch Set 6 : Rewrote StreamCompleter. #

Patch Set 7 : Switch StreamEvents to StreamQueue, completely new implementation that can support hasNext. #

Patch Set 8 : Add hasNext operation. #

Patch Set 9 : Remove the mutable delegating subscription again. #

Patch Set 10 : Add all.dart to test. Apparently people like that. #

Total comments: 117

Patch Set 11 : Address comments. #

Total comments: 10

Patch Set 12 : Address comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2173 lines, -4 lines) Patch
M CHANGELOG.md View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +16 lines, -0 lines 0 comments Download
M README.md View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M lib/async.dart View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +6 lines, -2 lines 0 comments Download
A lib/src/delegating_stream_subscription.dart View 1 2 3 4 5 6 7 8 1 chunk +44 lines, -0 lines 0 comments Download
A lib/src/stream_completer.dart View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +180 lines, -0 lines 0 comments Download
A lib/src/stream_queue.dart View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +619 lines, -0 lines 0 comments Download
A lib/src/subscription_stream.dart View 1 2 3 4 5 6 7 8 9 10 1 chunk +101 lines, -0 lines 0 comments Download
M pubspec.yaml View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download
A test/stream_completer_test.dart View 1 2 3 4 5 6 7 8 9 10 1 chunk +371 lines, -0 lines 0 comments Download
A test/stream_queue_test.dart View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +632 lines, -0 lines 0 comments Download
A test/subscription_stream_test.dart View 1 2 3 4 5 6 7 8 9 10 1 chunk +176 lines, -0 lines 0 comments Download
A test/utils.dart View 1 2 3 4 5 6 7 8 9 10 1 chunk +25 lines, -0 lines 0 comments Download

Messages

Total messages: 25 (3 generated)
Lasse Reichstein Nielsen
5 years, 6 months ago (2015-06-08 16:39:19 UTC) #2
ahe
Thank you, Lasse! I look forward to when this becomes available, but I dare not ...
5 years, 6 months ago (2015-06-08 16:55:16 UTC) #3
Lasse Reichstein Nielsen
+floitsch for naming suggestions. https://codereview.chromium.org/1149563010/diff/1/lib/src/stream_events.dart File lib/src/stream_events.dart (right): https://codereview.chromium.org/1149563010/diff/1/lib/src/stream_events.dart#newcode16 lib/src/stream_events.dart:16: class StreamEvents<T> { This is ...
5 years, 6 months ago (2015-06-09 07:33:53 UTC) #4
Søren Gjesse
LGTM Realy nice async abstractions. https://codereview.chromium.org/1149563010/diff/40001/lib/src/stream_completer.dart File lib/src/stream_completer.dart (right): https://codereview.chromium.org/1149563010/diff/40001/lib/src/stream_completer.dart#newcode27 lib/src/stream_completer.dart:27: class StreamCompleter<T> { Maybe ...
5 years, 6 months ago (2015-06-11 07:57:07 UTC) #5
nweiz
First of all: this is really exciting stuff. I'm glad to see this package getting ...
5 years, 6 months ago (2015-06-12 01:24:28 UTC) #7
Lasse Reichstein Nielsen
These are excellent comments, and it'll take some while going through them, so here are ...
5 years, 6 months ago (2015-06-12 13:04:23 UTC) #8
Lasse Reichstein Nielsen
PTAL. I really, really, REALLY need a better name for MutableDelegatingStreamSubscriptionController. https://codereview.chromium.org/1149563010/diff/40001/lib/src/stream_events.dart File lib/src/stream_events.dart (right): ...
5 years, 6 months ago (2015-06-15 15:46:25 UTC) #9
nweiz
I haven't quite finished responding yet, but I wanted to get this out before I ...
5 years, 6 months ago (2015-06-16 01:05:24 UTC) #10
Lasse Reichstein Nielsen
Didn't get to do any fixes today, but good comments! https://codereview.chromium.org/1149563010/diff/40001/lib/src/stream_completer.dart File lib/src/stream_completer.dart (right): https://codereview.chromium.org/1149563010/diff/40001/lib/src/stream_completer.dart#newcode1 ...
5 years, 6 months ago (2015-06-16 13:05:45 UTC) #11
nweiz
https://codereview.chromium.org/1149563010/diff/40001/lib/src/stream_completer.dart File lib/src/stream_completer.dart (right): https://codereview.chromium.org/1149563010/diff/40001/lib/src/stream_completer.dart#newcode1 lib/src/stream_completer.dart:1: // Copyright (c) 2015, the Dart project authors. Please ...
5 years, 6 months ago (2015-06-16 22:34:12 UTC) #12
Lasse Reichstein Nielsen
https://codereview.chromium.org/1149563010/diff/40001/lib/src/stream_completer.dart File lib/src/stream_completer.dart (right): https://codereview.chromium.org/1149563010/diff/40001/lib/src/stream_completer.dart#newcode1 lib/src/stream_completer.dart:1: // Copyright (c) 2015, the Dart project authors. Please ...
5 years, 6 months ago (2015-06-17 11:08:30 UTC) #13
nweiz
https://codereview.chromium.org/1149563010/diff/40001/lib/src/stream_completer.dart File lib/src/stream_completer.dart (right): https://codereview.chromium.org/1149563010/diff/40001/lib/src/stream_completer.dart#newcode1 lib/src/stream_completer.dart:1: // Copyright (c) 2015, the Dart project authors. Please ...
5 years, 6 months ago (2015-06-17 22:58:46 UTC) #14
Lasse Reichstein Nielsen
https://codereview.chromium.org/1149563010/diff/80001/lib/src/delegating_stream_subscription.dart File lib/src/delegating_stream_subscription.dart (right): https://codereview.chromium.org/1149563010/diff/80001/lib/src/delegating_stream_subscription.dart#newcode70 lib/src/delegating_stream_subscription.dart:70: class MutableDelegatingStreamSubscriptionController<T> { I'm not using it any more, ...
5 years, 6 months ago (2015-06-18 12:10:13 UTC) #15
Lasse Reichstein Nielsen
PTAL again. All bit-fields are gone now (*sniff*).
5 years, 6 months ago (2015-06-18 12:26:42 UTC) #16
nweiz
This is looking great :). https://codereview.chromium.org/1149563010/diff/180001/lib/src/stream_completer.dart File lib/src/stream_completer.dart (right): https://codereview.chromium.org/1149563010/diff/180001/lib/src/stream_completer.dart#newcode120 lib/src/stream_completer.dart:120: cancelOnError: cancelOnError); As written, ...
5 years, 6 months ago (2015-06-18 23:44:28 UTC) #17
Lasse Reichstein Nielsen
Finally got back to this CL. PTAL! https://codereview.chromium.org/1149563010/diff/180001/lib/src/stream_completer.dart File lib/src/stream_completer.dart (right): https://codereview.chromium.org/1149563010/diff/180001/lib/src/stream_completer.dart#newcode120 lib/src/stream_completer.dart:120: cancelOnError: cancelOnError); ...
5 years, 5 months ago (2015-06-30 10:34:15 UTC) #18
nweiz
lgtm https://codereview.chromium.org/1149563010/diff/180001/lib/src/stream_queue.dart File lib/src/stream_queue.dart (right): https://codereview.chromium.org/1149563010/diff/180001/lib/src/stream_queue.dart#newcode570 lib/src/stream_queue.dart:570: Stream getRestStream() { On 2015/06/30 10:34:14, Lasse Reichstein ...
5 years, 5 months ago (2015-06-30 23:39:48 UTC) #19
kevmoo
DBC – don't forget to bump the version in pubspec.yaml and add entries to the ...
5 years, 5 months ago (2015-07-01 00:12:12 UTC) #21
nweiz
Also: don't forget to mention the new classes in the CHANGELOG.
5 years, 5 months ago (2015-07-01 00:13:00 UTC) #22
Lasse Reichstein Nielsen
https://codereview.chromium.org/1149563010/diff/180001/lib/src/stream_queue.dart File lib/src/stream_queue.dart (right): https://codereview.chromium.org/1149563010/diff/180001/lib/src/stream_queue.dart#newcode570 lib/src/stream_queue.dart:570: Stream getRestStream() { Agree. Moved to private instance method. ...
5 years, 5 months ago (2015-07-01 08:24:57 UTC) #23
Søren Gjesse
LGTM! I especially appreciate the amount of documentation.
5 years, 5 months ago (2015-07-01 08:27:36 UTC) #24
Lasse Reichstein Nielsen
5 years, 5 months ago (2015-07-01 08:44:24 UTC) #25
Message was sent while issue was closed.
Committed patchset #12 (id:220001) manually as
dc58de5505ed02563370f03f7f17377f2bfc9e98 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698