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

Side by Side Diff: pkg/barback/lib/src/utils/stream_replayer.dart

Issue 261823008: Reorganize barback's source files. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: re-add barback/lib/src/internal_asset.dart Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « pkg/barback/lib/src/utils/stream_pool.dart ('k') | pkg/barback/test/asset_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library barback.stream_replayer; 5 library barback.utils.stream_replayer;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:collection'; 8 import 'dart:collection';
9 9
10 import 'utils.dart'; 10 import '../utils.dart';
11 11
12 /// Records the values and errors that are sent through a stream and allows them 12 /// Records the values and errors that are sent through a stream and allows them
13 /// to be replayed arbitrarily many times. 13 /// to be replayed arbitrarily many times.
14 /// 14 ///
15 /// This only listens to the wrapped stream when a replayed stream gets a 15 /// This only listens to the wrapped stream when a replayed stream gets a
16 /// listener. 16 /// listener.
17 class StreamReplayer<T> { 17 class StreamReplayer<T> {
18 /// The wrapped stream. 18 /// The wrapped stream.
19 final Stream<T> _stream; 19 final Stream<T> _stream;
20 20
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 } 74 }
75 }, onDone: () { 75 }, onDone: () {
76 _isClosed = true; 76 _isClosed = true;
77 for (var controller in _controllers) { 77 for (var controller in _controllers) {
78 controller.close(); 78 controller.close();
79 } 79 }
80 _controllers.clear(); 80 _controllers.clear();
81 }); 81 });
82 } 82 }
83 } 83 }
OLDNEW
« no previous file with comments | « pkg/barback/lib/src/utils/stream_pool.dart ('k') | pkg/barback/test/asset_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698