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

Issue 11880019: Avoid the _onSubscriptionStateChange being called twice in some cases. (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

Avoid the _onSubscriptionStateChange being called twice in some cases. R=floitsch@google.com Committed: https://code.google.com/p/dart/source/detail?r=17048

Patch Set 1 #

Total comments: 9

Patch Set 2 : Address comments. Make single-stream not paused when it's closed. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+51 lines, -28 lines) Patch
M sdk/lib/async/stream_impl.dart View 1 10 chunks +33 lines, -15 lines 0 comments Download
M tests/lib/async/stream_from_iterable_test.dart View 1 2 chunks +18 lines, -13 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Lasse Reichstein Nielsen
7 years, 11 months ago (2013-01-14 12:18:25 UTC) #1
floitsch
LGTM. https://codereview.chromium.org/11880019/diff/1/sdk/lib/async/stream_impl.dart File sdk/lib/async/stream_impl.dart (right): https://codereview.chromium.org/11880019/diff/1/sdk/lib/async/stream_impl.dart#newcode487 sdk/lib/async/stream_impl.dart:487: int timesPaused = subscriber._setUnsubscribed(); Add comment: Unsubscribing a ...
7 years, 11 months ago (2013-01-14 16:31:24 UTC) #2
Lasse Reichstein Nielsen
https://codereview.chromium.org/11880019/diff/1/sdk/lib/async/stream_impl.dart File sdk/lib/async/stream_impl.dart (right): https://codereview.chromium.org/11880019/diff/1/sdk/lib/async/stream_impl.dart#newcode487 sdk/lib/async/stream_impl.dart:487: int timesPaused = subscriber._setUnsubscribed(); On 2013/01/14 16:31:24, floitsch wrote: ...
7 years, 11 months ago (2013-01-15 08:52:54 UTC) #3
floitsch
7 years, 11 months ago (2013-01-15 14:40:19 UTC) #4
Message was sent while issue was closed.
https://codereview.chromium.org/11880019/diff/1/sdk/lib/async/stream_impl.dart
File sdk/lib/async/stream_impl.dart (right):

https://codereview.chromium.org/11880019/diff/1/sdk/lib/async/stream_impl.dar...
sdk/lib/async/stream_impl.dart:670: // In the case where there only pending
events are generated ones.
On 2013/01/15 08:52:54, Lasse Reichstein Nielsen wrote:
> It's commenting that in this particular class, it's possible to have pending
> events even if there is no _pendingEvents object, which is why we can't use
the
> branch before.
> Comment updated.
> 
> I think I'll change how generated events work, and instead generate them
inside
> the pending events object, so the rest of the object doesn't need changing.

Did you commit? The comment still looks the same.

Powered by Google App Engine
This is Rietveld 408576698