Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 /// A [Runner] runs a function, potentially in a different scope | 5 /// A [Runner] runs a function, potentially in a different scope |
| 6 /// or even isolate. | 6 /// or even isolate. |
| 7 library dart.pkg.isolate.runner; | 7 library isolate.runner; |
| 8 | 8 |
| 9 import "dart:async" show Future; | 9 import 'dart:async' show Future; |
|
Lasse Reichstein Nielsen
2015/03/24 10:35:38
Why change quotes?
kevmoo
2015/03/24 13:21:19
Consistency is nice.
| |
| 10 | 10 |
| 11 /// Calls a function with an argument. | 11 /// Calls a function with an argument. |
| 12 /// | 12 /// |
| 13 /// The function can be run in a different place from where the `Runner` | 13 /// The function can be run in a different place from where the `Runner` |
| 14 /// resides, e.g., in a different isolate. | 14 /// resides, e.g., in a different isolate. |
| 15 class Runner { | 15 class Runner { |
| 16 /// Request that [function] be called with the provided arguments. | 16 /// Request that [function] be called with the provided arguments. |
| 17 /// | 17 /// |
| 18 /// The arguments will be applied to the function in the same way as by | 18 /// The arguments will be applied to the function in the same way as by |
| 19 /// [Function.apply], but it may happen in a diffent isolate or setting. | 19 /// [Function.apply], but it may happen in a diffent isolate or setting. |
| (...skipping 24 matching lines...) Expand all Loading... | |
| 44 return result; | 44 return result; |
| 45 } | 45 } |
| 46 | 46 |
| 47 /// Stop the runner. | 47 /// Stop the runner. |
| 48 /// | 48 /// |
| 49 /// If the runner has allocated resources, e.g., an isolate, it should | 49 /// If the runner has allocated resources, e.g., an isolate, it should |
| 50 /// be released. No further calls to [run] should be made after calling | 50 /// be released. No further calls to [run] should be made after calling |
| 51 /// stop. | 51 /// stop. |
| 52 Future close() => new Future.value(); | 52 Future close() => new Future.value(); |
| 53 } | 53 } |
| OLD | NEW |