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

Unified Diff: sdk/lib/_internal/pub/lib/src/error_group.dart

Issue 91213002: Add Future.timeout. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update indentation. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/scheduled_test/lib/src/value_future.dart ('k') | sdk/lib/async/future.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/pub/lib/src/error_group.dart
diff --git a/sdk/lib/_internal/pub/lib/src/error_group.dart b/sdk/lib/_internal/pub/lib/src/error_group.dart
index ea924e83e2f734d3b5c30a5d18010a1cb45ac2f1..ae0410f21c742192def5246849a01882187bd303 100644
--- a/sdk/lib/_internal/pub/lib/src/error_group.dart
+++ b/sdk/lib/_internal/pub/lib/src/error_group.dart
@@ -194,6 +194,11 @@ class _ErrorGroupFuture implements Future {
return _completer.future.whenComplete(action);
}
+ Future timeout(Duration timeLimit, [void onTimeout()]) {
+ _hasListeners = true;
+ return _completer.future.timeout(timeLimit, onTimeout);
+ }
+
Stream asStream() {
_hasListeners = true;
return _completer.future.asStream();
« no previous file with comments | « pkg/scheduled_test/lib/src/value_future.dart ('k') | sdk/lib/async/future.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698