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

Side by Side Diff: sdk/lib/isolate/isolate.dart

Issue 1286193006: Make Dart2js implement the onExit/onError/errorsAreFatal parameters to spawnUri. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Address comments Created 5 years, 4 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 unified diff | Download patch
« no previous file with comments | « sdk/lib/_internal/js_runtime/lib/isolate_patch.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 /** 5 /**
6 * Concurrent programming using _isolates_: 6 * Concurrent programming using _isolates_:
7 * independent workers that are similar to threads 7 * independent workers that are similar to threads
8 * but don't share memory, 8 * but don't share memory,
9 * communicating only via messages. 9 * communicating only via messages.
10 */ 10 */
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 * the isolate will act as if, respectively, [setErrorsFatal], 150 * the isolate will act as if, respectively, [setErrorsFatal],
151 * [addOnExitListener] and [addErrorListener] were called with the 151 * [addOnExitListener] and [addErrorListener] were called with the
152 * corresponding parameter and was processed before the isolate starts 152 * corresponding parameter and was processed before the isolate starts
153 * running. 153 * running.
154 * 154 *
155 * You can also call the [setErrorsFatal], [addOnExitListener] and 155 * You can also call the [setErrorsFatal], [addOnExitListener] and
156 * [addErrorListener] methods on the returned isolate, but unless the 156 * [addErrorListener] methods on the returned isolate, but unless the
157 * isolate was started as [paused], it may already have terminated 157 * isolate was started as [paused], it may already have terminated
158 * before those methods can complete. 158 * before those methods can complete.
159 * 159 *
160 * WARNING: The [errorsAreFatal], [onExit] and [onError] parameters are not
161 * implemented yet.
162 *
163 * Returns a future that will complete with an [Isolate] instance if the 160 * Returns a future that will complete with an [Isolate] instance if the
164 * spawning succeeded. It will complete with an error otherwise. 161 * spawning succeeded. It will complete with an error otherwise.
165 */ 162 */
166 external static Future<Isolate> spawn(void entryPoint(message), var message, 163 external static Future<Isolate> spawn(void entryPoint(message), var message,
167 { bool paused: false, 164 { bool paused: false,
168 bool errorsAreFatal, 165 bool errorsAreFatal,
169 SendPort onExit, 166 SendPort onExit,
170 SendPort onError }); 167 SendPort onError });
171 168
172 /** 169 /**
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after
638 * as the original error, but has no other features of the original error. 635 * as the original error, but has no other features of the original error.
639 */ 636 */
640 class RemoteError implements Error { 637 class RemoteError implements Error {
641 final String _description; 638 final String _description;
642 final StackTrace stackTrace; 639 final StackTrace stackTrace;
643 RemoteError(String description, String stackDescription) 640 RemoteError(String description, String stackDescription)
644 : _description = description, 641 : _description = description,
645 stackTrace = new StackTrace.fromString(stackDescription); 642 stackTrace = new StackTrace.fromString(stackDescription);
646 String toString() => _description; 643 String toString() => _description;
647 } 644 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/js_runtime/lib/isolate_patch.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698