Discussion:
[dart-misc] Pause / Result a stream in await for clause
Adam Lofts
2016-08-17 16:54:28 UTC
Permalink
Hi,

I have a bit of code like this:

await for (var v in linesOfDataFromHttpClient()) {
slowFunction(v);
}

1. If linesOfDataFromHttpClient() is big then does this buffer a lot of
data in ram?
2. Can I fix this by calling pause on the stream?
3. Do I have do re-factor the await for in order to get the
StreamSubscription to call pause/resume?

Thanks in advance for any insight,
Adam
--
For other discussions, see https://groups.google.com/a/dartlang.org/

For HOWTO questions, visit http://stackoverflow.com/tags/dart

To file a bug report or feature request, go to http://www.dartbug.com/new
---
You received this message because you are subscribed to the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.
Loading...