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

Unified Diff: sdk/lib/async/stream.dart

Issue 11791045: Added toMultiSubscriber on Stream. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | sdk/lib/async/stream_impl.dart » ('j') | sdk/lib/async/stream_impl.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/async/stream.dart
diff --git a/sdk/lib/async/stream.dart b/sdk/lib/async/stream.dart
index 68e2588bbab43e4717b253c5116992817a0e4ed8..2aa611aad9889d3709b62aaec0bf3c1eea0304d0 100644
--- a/sdk/lib/async/stream.dart
+++ b/sdk/lib/async/stream.dart
@@ -25,6 +25,18 @@ abstract class Stream<T> {
}
/**
+ * Returns a multi-subscription stream that produces the same events.
floitsch 2013/01/08 14:06:00 same events as [this].
Lasse Reichstein Nielsen 2013/01/09 15:19:17 Done.
+ *
+ * If this stream is single-subscription, the new multi-subscription
floitsch 2013/01/08 14:06:00 As discussed: we want to be more specific on the b
Lasse Reichstein Nielsen 2013/01/09 15:19:17 Done.
+ * stream gets its data by subscribing to this stream which must not already
+ * have a subscriber, and which can't get another subscriber at a later time.
+ *
+ * If this stream is already multi-subscriber, there is no difference between
+ * this stream and the returned stream. They may even be the same object.
+ */
+ Stream<T> toMultiSubscriber();
floitsch 2013/01/08 14:06:00 asMultiSubscriptionStream()
Lasse Reichstein Nielsen 2013/01/09 15:19:17 Very, very long. Doesn't match new StreamControll
+
+ /**
* Stream that outputs events from the [sources] in cyclic order.
*
* The merged streams are paused and resumed in order to ensure the proper
« no previous file with comments | « no previous file | sdk/lib/async/stream_impl.dart » ('j') | sdk/lib/async/stream_impl.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698