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

Side by Side Diff: sdk/lib/async/stream.dart

Issue 48483002: Remove deprecated parts of dart:async. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comment. Created 7 years, 1 month 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 | « sdk/lib/async/schedule_microtask.dart ('k') | sdk/lib/async/stream_controller.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 part of dart.async; 5 part of dart.async;
6 6
7 // ------------------------------------------------------------------- 7 // -------------------------------------------------------------------
8 // Core Stream types 8 // Core Stream types
9 // ------------------------------------------------------------------- 9 // -------------------------------------------------------------------
10 10
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 bool first = true; 395 bool first = true;
396 subscription = this.listen( 396 subscription = this.listen(
397 (T element) { 397 (T element) {
398 if (!first) { 398 if (!first) {
399 buffer.write(separator); 399 buffer.write(separator);
400 } 400 }
401 first = false; 401 first = false;
402 try { 402 try {
403 buffer.write(element); 403 buffer.write(element);
404 } catch (e, s) { 404 } catch (e, s) {
405 _cancelAndError(subscription, result, _asyncError(e, s), s); 405 _cancelAndError(subscription, result, e, s);
406 } 406 }
407 }, 407 },
408 onError: (e) { 408 onError: (e) {
409 result._completeError(e); 409 result._completeError(e);
410 }, 410 },
411 onDone: () { 411 onDone: () {
412 result._complete(buffer.toString()); 412 result._complete(buffer.toString());
413 }, 413 },
414 cancelOnError: true); 414 cancelOnError: true);
415 return result; 415 return result;
(...skipping 807 matching lines...) Expand 10 before | Expand all | Expand 10 after
1223 * 1223 *
1224 * If you need to stop listening for values before the stream iterator is 1224 * If you need to stop listening for values before the stream iterator is
1225 * automatically closed, you must call [cancel] to ensure that the stream 1225 * automatically closed, you must call [cancel] to ensure that the stream
1226 * is properly closed. 1226 * is properly closed.
1227 * 1227 *
1228 * Returns a future if the cancel-operation is not completed synchronously. 1228 * Returns a future if the cancel-operation is not completed synchronously.
1229 * Otherwise returns `null`. 1229 * Otherwise returns `null`.
1230 */ 1230 */
1231 Future cancel(); 1231 Future cancel();
1232 } 1232 }
OLDNEW
« no previous file with comments | « sdk/lib/async/schedule_microtask.dart ('k') | sdk/lib/async/stream_controller.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698