Index: sdk/lib/isolate/isolate.dart |
diff --git a/sdk/lib/isolate/isolate.dart b/sdk/lib/isolate/isolate.dart |
index 8372eafbc169c2562f212ff442b810ec352a6a54..9b488c21bb243150f8e52c68dd02c3034e105f67 100644 |
--- a/sdk/lib/isolate/isolate.dart |
+++ b/sdk/lib/isolate/isolate.dart |
@@ -276,6 +276,10 @@ class Isolate { |
* If `response` cannot be sent to the isolate, then the request is ignored. |
* It is recommended to only use simple values that can be sent to all |
* isolates, like `null`, booleans, numbers or strings. |
+ * |
+ * Since isolates run concurrently, it's possible for it to exit before the |
+ * exit listener is established. To avoid this, start the isolate paused, |
+ * add the listener, then resume it. |
*/ |
/* TODO(lrn): Can we do better? Can the system recognize this message and |
* send a reply if the receiving isolate is dead? |
@@ -364,6 +368,10 @@ class Isolate { |
* |
* Listening using the same port more than once does nothing. It will only |
* get each error once. |
+ * |
+ * Since isolates run concurrently, it's possible for it to exit before the |
nweiz
2015/06/12 19:18:55
"exit" -> "emit an error"
Lasse Reichstein Nielsen
2015/06/12 19:38:16
"exit or emit an error"?
It can do either or both
nweiz
2015/06/12 21:05:43
That's true, but if it exits before the listener i
|
+ * error listener is established. To avoid this, start the isolate paused, |
+ * add the listener, then resume it. |
*/ |
external void addErrorListener(SendPort port); |