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. |
+ */ |
+DART_EXPORT bool Dart_HasLivePorts(); |
+ |
+/** |
* Posts a message for some isolate. The message is built from a raw |
* array. |
* |
@@ -473,6 +486,16 @@ |
*/ |
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/24 00:52:31
If I call this function multiple times with the sa
turnidge
2011/11/29 01:01:31
Discussed offline, multiple SendPorts will work.
|
+ |
+/** |
+ * Returns a new ReceivePort with the provided id. |
+ */ |
+DART_EXPORT Dart_Handle Dart_NewReceivePort(Dart_Port port); |
siva
2011/11/24 00:52:31
Ditto comment on multiple receive ports.
turnidge
2011/11/29 01:01:31
Multiple ReceivePorts don't work. Added a comment
|
+ |
// --- Scopes ---- |
/** |