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

Unified Diff: sdk/lib/isolate/isolate.dart

Issue 93873014: Update isolate documentation. Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add isolateMessageException Created 7 years 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
Index: sdk/lib/isolate/isolate.dart
diff --git a/sdk/lib/isolate/isolate.dart b/sdk/lib/isolate/isolate.dart
index efc6ca252557a46969ddb6a3131c175ec2f29080..15ae1792e232346c07fdc54f3ccb2ea1d6a76229 100644
--- a/sdk/lib/isolate/isolate.dart
+++ b/sdk/lib/isolate/isolate.dart
@@ -26,6 +26,18 @@ class IsolateSpawnException implements Exception {
final String _s;
}
+/**
+ * Thrown when an isolate message is invalid.
+ */
+class IsolateMessageException implements Exception {
+ final String _message;
+
+ // TODO(floitsch): give access to the message that couldn't be sent.
Lasse Reichstein Nielsen 2013/12/11 10:38:28 Ah, agree :)
+ const IsolateMessageException(String this._message);
+
+ String toString() => "IsolateMessageException: '$_message'";
+}
+
class Isolate {
final SendPort _controlPort;
@@ -50,6 +62,8 @@ class Isolate {
*
* Returns a future that will complete with an [Isolate] instance if the
* spawning succeeded. It will complete with an error otherwise.
+ *
+ * All errors are reported asynchronously through the returned future.
Lasse Reichstein Nielsen 2013/12/11 10:38:28 Not necessarily all errors. Let's specify which ar
floitsch 2013/12/11 12:14:16 Yes. This should be changed to list all the possib
*/
external static Future<Isolate> spawn(void entryPoint(message), var message);
@@ -71,6 +85,8 @@ class Isolate {
*
* Returns a future that will complete with an [Isolate] instance if the
* spawning succeeded. It will complete with an error otherwise.
+ *
+ * All errors are reported asynchronously through the returned future.
Lasse Reichstein Nielsen 2013/12/11 10:38:28 Ditto.
*/
external static Future<Isolate> spawnUri(
Uri uri, List<String> args, var message);
« sdk/lib/_internal/lib/isolate_helper.dart ('K') | « sdk/lib/_internal/lib/isolate_helper.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698