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

Unified Diff: pkg/scheduled_test/lib/scheduled_process.dart

Issue 15184003: Add additional Schedule heartbeat calls. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 7 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/_internal/pub/lib/src/hosted_source.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/scheduled_test/lib/scheduled_process.dart
diff --git a/pkg/scheduled_test/lib/scheduled_process.dart b/pkg/scheduled_test/lib/scheduled_process.dart
index ad6d4daa4fd8b194928788e1e530fe10d0c8eaee..23370f10942602b5ccc0e42e56dbce3c3d87c70e 100644
--- a/pkg/scheduled_test/lib/scheduled_process.dart
+++ b/pkg/scheduled_test/lib/scheduled_process.dart
@@ -188,6 +188,12 @@ class ScheduledProcess {
Future<Stream<List<int>>> streamFuture) {
return streamWithCanceller(futureStream(streamFuture)
.handleError((e) => currentSchedule.signalError(e))
+ .map((chunk) {
+ // Whenever the process produces any sort of output, reset the schedule's
+ // timer.
+ currentSchedule.heartbeat();
+ return chunk;
+ })
.transform(new StringDecoder(_encoding))
.transform(new LineTransformer()));
}
« no previous file with comments | « no previous file | sdk/lib/_internal/pub/lib/src/hosted_source.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698