Index: runtime/include/dart_api.h |
=================================================================== |
--- runtime/include/dart_api.h (revision 1762) |
+++ runtime/include/dart_api.h (working copy) |
@@ -445,6 +445,19 @@ |
// TODO(turnidge): Should this be removed from the public api? |
/** |
+ * Gets the main Dart_Port for the current isolate. |
+ */ |
+DART_EXPORT Dart_Port Dart_GetMainPort(); |
+ |
+/** |
+ * Does the current isolate have live ReceivePorts? |
+ * |
+ * A port is live when it has not been closed and when |
+ * ReceivePort.receive() has been called to install a receive handler. |
+ */ |
siva
2011/11/29 19:50:27
Is this comment still valid?
turnidge
2011/12/05 17:53:34
Updated.
|
+DART_EXPORT bool Dart_HasLivePorts(); |
+ |
+/** |
* Posts a message for some isolate. The message is built from a raw |
* array. |
* |
@@ -473,6 +486,18 @@ |
*/ |
DART_EXPORT bool Dart_Post(Dart_Port port, Dart_Handle object); |
+/** |
+ * Returns a new SendPort with the provided id. |
+ */ |
+DART_EXPORT Dart_Handle Dart_NewSendPort(Dart_Port port); |
siva
2011/11/29 19:50:27
I would call the variable port_id to avoid having
turnidge
2011/12/05 17:53:34
Done. I also updated all other Dart_Port paramete
|
+ |
+/** |
+ * Returns a new ReceivePort with the provided id. |
+ * |
+ * Do not create multiple ReceivePorts with the same id. |
siva
2011/11/29 19:50:27
Is this a comment for the user stating that they s
turnidge
2011/12/05 17:53:34
Changed this function to Dart_GetReceivePort to im
|
+ */ |
+DART_EXPORT Dart_Handle Dart_NewReceivePort(Dart_Port port); |
siva
2011/11/29 19:50:27
port => port_id
turnidge
2011/12/05 17:53:34
Done.
|
+ |
// --- Scopes ---- |
/** |