Index: runtime/lib/isolate_patch.dart |
=================================================================== |
--- runtime/lib/isolate_patch.dart (revision 42173) |
+++ runtime/lib/isolate_patch.dart (working copy) |
@@ -322,7 +322,9 @@ |
// in vm/isolate.cc. |
static const _PAUSE = 1; |
static const _RESUME = 2; |
+ static const _PING = 3; |
+ |
static SendPort _spawnFunction(SendPort readyPort, Function topLevelFunction, |
var message) |
native "Isolate_spawnFunction"; |
@@ -369,7 +371,12 @@ |
} |
/* patch */ void ping(SendPort responsePort, [int pingType = IMMEDIATE]) { |
- throw new UnsupportedError("ping"); |
+ var msg = new List(4) |
+ ..[0] = 0 // Make room for OOM message type. |
+ ..[1] = _PING |
+ ..[2] = responsePort |
+ ..[3] = pingType; |
+ _sendOOB(controlPort, msg); |
} |
/* patch */ void addErrorListener(SendPort port) { |