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

Unified Diff: sdk/lib/_internal/lib/isolate_patch.dart

Issue 163523003: Add 'startPaused' option to Isolate.spawn*. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 6 years, 10 months 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 | « sdk/lib/_internal/lib/isolate_helper.dart ('k') | sdk/lib/isolate/isolate.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/lib/isolate_patch.dart
diff --git a/sdk/lib/_internal/lib/isolate_patch.dart b/sdk/lib/_internal/lib/isolate_patch.dart
index 9d931a95c995a27ff274bf39647c925fc021511c..3858c159c137a456d0fe83ebdb149647d5a5a15f 100644
--- a/sdk/lib/_internal/lib/isolate_patch.dart
+++ b/sdk/lib/_internal/lib/isolate_patch.dart
@@ -12,9 +12,10 @@ import 'dart:_isolate_helper' show CapabilityImpl,
RawReceivePortImpl;
patch class Isolate {
- patch static Future<Isolate> spawn(void entryPoint(message), var message) {
+ patch static Future<Isolate> spawn(void entryPoint(message), var message,
+ { bool paused: false }) {
try {
- return IsolateNatives.spawnFunction(entryPoint, message)
+ return IsolateNatives.spawnFunction(entryPoint, message, paused)
.then((msg) => new Isolate._fromControlPort(msg[1], msg[2]));
} catch (e, st) {
return new Future<Isolate>.error(e, st);
@@ -22,7 +23,7 @@ patch class Isolate {
}
patch static Future<Isolate> spawnUri(
- Uri uri, List<String> args, var message) {
+ Uri uri, List<String> args, var message, { bool paused: false }) {
try {
if (args is List<String>) {
for (int i = 0; i < args.length; i++) {
@@ -33,7 +34,7 @@ patch class Isolate {
} else if (args != null) {
throw new ArgumentError("Args must be a list of Strings $args");
}
- return IsolateNatives.spawnUri(uri, args, message)
+ return IsolateNatives.spawnUri(uri, args, message, paused)
.then((msg) => new Isolate._fromControlPort(msg[1], msg[2]));
} catch (e, st) {
return new Future<Isolate>.error(e, st);
« no previous file with comments | « sdk/lib/_internal/lib/isolate_helper.dart ('k') | sdk/lib/isolate/isolate.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698