Chromium Code Reviews| Index: sdk/lib/_internal/pub/lib/src/io.dart |
| diff --git a/sdk/lib/_internal/pub/lib/src/io.dart b/sdk/lib/_internal/pub/lib/src/io.dart |
| index 90b06f9aebf8670929df79aca3925ea430bf927e..f28b852cc37bd3c994420ae2952bd8aa5022242b 100644 |
| --- a/sdk/lib/_internal/pub/lib/src/io.dart |
| +++ b/sdk/lib/_internal/pub/lib/src/io.dart |
| @@ -5,7 +5,8 @@ |
| /// Helper functionality to make working with IO easier. |
| library pub.io; |
| -import 'dart:async' hide TimeoutException; |
| +import 'dart:async'; |
| +export 'dart:async' show TimeoutException; |
|
Bob Nystrom
2013/12/02 22:40:42
Let's remove this and just change any other files
Lasse Reichstein Nielsen
2013/12/03 08:38:29
Removed.
I don't think it's needed anywhere, but I
|
| import 'dart:collection'; |
| import 'dart:convert'; |
| import 'dart:io'; |
| @@ -631,9 +632,10 @@ Future _doProcess(Function fn, String executable, List<String> args, |
| /// [input]. |
| Future timeout(Future input, int milliseconds, String description) { |
|
nweiz
2013/12/02 23:54:22
Add a TODO assigned to me to replace this with [Fu
Lasse Reichstein Nielsen
2013/12/03 08:38:29
Done.
|
| var completer = new Completer(); |
| - var timer = new Timer(new Duration(milliseconds: milliseconds), () { |
| + var duration = new Duration(milliseconds: milliseconds); |
| + var timer = new Timer(duration, () { |
| completer.completeError(new TimeoutException( |
| - 'Timed out while $description.'), |
| + 'Timed out while $description.', duration), |
| new Trace.current()); |
| }); |
| input.then((value) { |
| @@ -816,15 +818,6 @@ ByteStream createTarGz(List contents, {baseDir}) { |
| return new ByteStream(controller.stream); |
| } |
| -/// Exception thrown when an operation times out. |
| -class TimeoutException implements Exception { |
| - final String message; |
| - |
| - const TimeoutException(this.message); |
| - |
| - String toString() => message; |
| -} |
| - |
| /// Contains the results of invoking a [Process] and waiting for it to complete. |
| class PubProcessResult { |
| final List<String> stdout; |