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

Unified Diff: runtime/lib/isolate_patch.dart

Issue 800713002: - Implement Isolate.kill. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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
« no previous file with comments | « no previous file | runtime/vm/code_generator.cc » ('j') | runtime/vm/code_generator.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/isolate_patch.dart
===================================================================
--- runtime/lib/isolate_patch.dart (revision 42195)
+++ runtime/lib/isolate_patch.dart (working copy)
@@ -323,6 +323,7 @@
static const _PAUSE = 1;
static const _RESUME = 2;
static const _PING = 3;
+ static const _KILL = 4;
static SendPort _spawnFunction(SendPort readyPort, Function topLevelFunction,
@@ -338,7 +339,7 @@
/* patch */ void _pause(Capability resumeCapability) {
var msg = new List(4)
- ..[0] = 0 // Make room for OOM message type.
+ ..[0] = 0 // Make room for OOB message type.
..[1] = _PAUSE
..[2] = pauseCapability
..[3] = resumeCapability;
@@ -347,7 +348,7 @@
/* patch */ void resume(Capability resumeCapability) {
var msg = new List(4)
- ..[0] = 0 // Make room for OOM message type.
+ ..[0] = 0 // Make room for OOB message type.
..[1] = _RESUME
..[2] = pauseCapability
..[3] = resumeCapability;
@@ -367,7 +368,12 @@
}
/* patch */ void kill([int priority = BEFORE_NEXT_EVENT]) {
- throw new UnsupportedError("kill");
+ var msg = new List(4)
+ ..[0] = 0 // Make room for OOB message type.
+ ..[1] = _KILL
+ ..[2] = terminateCapability
+ ..[3] = priority;
+ _sendOOB(controlPort, msg);
}
/* patch */ void ping(SendPort responsePort, [int pingType = IMMEDIATE]) {
« no previous file with comments | « no previous file | runtime/vm/code_generator.cc » ('j') | runtime/vm/code_generator.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698