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

Side by Side Diff: lib/stream_channel.dart

Issue 1635873002: Add an IsolateChannel class. (Closed) Base URL: git@github.com:dart-lang/stream_channel.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « lib/src/isolate_channel.dart ('k') | pubspec.yaml » ('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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 import 'dart:async'; 5 import 'dart:async';
6 6
7 export 'src/delegating_stream_channel.dart'; 7 export 'src/delegating_stream_channel.dart';
8 export 'src/isolate_channel.dart';
8 export 'src/multi_channel.dart'; 9 export 'src/multi_channel.dart';
9 10
10 /// An abstract class representing a two-way communication channel. 11 /// An abstract class representing a two-way communication channel.
11 /// 12 ///
12 /// Users should consider the [stream] emitting a "done" event to be the 13 /// Users should consider the [stream] emitting a "done" event to be the
13 /// canonical indicator that the channel has closed. If they wish to close the 14 /// canonical indicator that the channel has closed. If they wish to close the
14 /// channel, they should close the [sink]—canceling the stream subscription is 15 /// channel, they should close the [sink]—canceling the stream subscription is
15 /// not sufficient. Protocol errors may be emitted through the stream or through 16 /// not sufficient. Protocol errors may be emitted through the stream or through
16 /// [Sink.done], depending on their underlying cause. Note that the sink may 17 /// [Sink.done], depending on their underlying cause. Note that the sink may
17 /// silently drop events if the channel closes before [Sink.close] is called. 18 /// silently drop events if the channel closes before [Sink.close] is called.
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 } 80 }
80 81
81 /// A mixin that implements the instance methods of [StreamChannel] in terms of 82 /// A mixin that implements the instance methods of [StreamChannel] in terms of
82 /// [stream] and [sink]. 83 /// [stream] and [sink].
83 abstract class StreamChannelMixin<T> implements StreamChannel<T> { 84 abstract class StreamChannelMixin<T> implements StreamChannel<T> {
84 void pipe(StreamChannel<T> other) { 85 void pipe(StreamChannel<T> other) {
85 stream.pipe(other.sink); 86 stream.pipe(other.sink);
86 other.stream.pipe(sink); 87 other.stream.pipe(sink);
87 } 88 }
88 } 89 }
OLDNEW
« no previous file with comments | « lib/src/isolate_channel.dart ('k') | pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698