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

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

Issue 1221033008: Revert usage of delegating generative constructor, still not supported by VM. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 5 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 | « no previous file | tests/lib/lib.status » ('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 1655 matching lines...) Expand 10 before | Expand all | Expand 10 after
1666 /** 1666 /**
1667 * An [Iterator] like interface for the values of a [Stream]. 1667 * An [Iterator] like interface for the values of a [Stream].
1668 * 1668 *
1669 * This wraps a [Stream] and a subscription on the stream. It listens 1669 * This wraps a [Stream] and a subscription on the stream. It listens
1670 * on the stream, and completes the future returned by [moveNext] when the 1670 * on the stream, and completes the future returned by [moveNext] when the
1671 * next value becomes available. 1671 * next value becomes available.
1672 */ 1672 */
1673 abstract class StreamIterator<T> { 1673 abstract class StreamIterator<T> {
1674 1674
1675 /** Create a [StreamIterator] on [stream]. */ 1675 /** Create a [StreamIterator] on [stream]. */
1676 factory StreamIterator(Stream<T> stream) = _StreamIteratorImpl<T>; 1676 factory StreamIterator(Stream<T> stream)
1677 // TODO(lrn): use redirecting factory constructor when type
1678 // arguments are supported.
1679 => new _StreamIteratorImpl<T>(stream);
1677 1680
1678 /** 1681 /**
1679 * Wait for the next stream value to be available. 1682 * Wait for the next stream value to be available.
1680 * 1683 *
1681 * Returns a future which will complete with either `true` or `false`. 1684 * Returns a future which will complete with either `true` or `false`.
1682 * Completing with `true` means that another event has been received and 1685 * Completing with `true` means that another event has been received and
1683 * can be read as [current]. 1686 * can be read as [current].
1684 * Completing with `false` means that the stream itearation is done and 1687 * Completing with `false` means that the stream itearation is done and
1685 * no further events will ever be available. 1688 * no further events will ever be available.
1686 * The future may complete with an error, if the stream produces an error, 1689 * The future may complete with an error, if the stream produces an error,
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
1732 class _ControllerEventSinkWrapper<T> implements EventSink<T> { 1735 class _ControllerEventSinkWrapper<T> implements EventSink<T> {
1733 EventSink _sink; 1736 EventSink _sink;
1734 _ControllerEventSinkWrapper(this._sink); 1737 _ControllerEventSinkWrapper(this._sink);
1735 1738
1736 void add(T data) { _sink.add(data); } 1739 void add(T data) { _sink.add(data); }
1737 void addError(error, [StackTrace stackTrace]) { 1740 void addError(error, [StackTrace stackTrace]) {
1738 _sink.addError(error, stackTrace); 1741 _sink.addError(error, stackTrace);
1739 } 1742 }
1740 void close() { _sink.close(); } 1743 void close() { _sink.close(); }
1741 } 1744 }
OLDNEW
« no previous file with comments | « no previous file | tests/lib/lib.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698