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

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

Issue 148883009: Add Capability class. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
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 *
11 * See also: 11 * See also:
12 * [dart:isolate - Concurrency with Isolates](https://www.dartlang.org/docs/dart -up-and-running/contents/ch03.html#ch03-dartisolate---concurrency-with-isolates) 12 * [dart:isolate - Concurrency with Isolates](https://www.dartlang.org/docs/dart -up-and-running/contents/ch03.html#ch03-dartisolate---concurrency-with-isolates)
13 * in the library tour. 13 * in the library tour.
14 */ 14 */
15 library dart.isolate; 15 library dart.isolate;
16 16
17 import "dart:async"; 17 import "dart:async";
18 18
19 part "capability.dart";
20
19 /** 21 /**
20 * Thrown when an isolate cannot be created. 22 * Thrown when an isolate cannot be created.
21 */ 23 */
22 class IsolateSpawnException implements Exception { 24 class IsolateSpawnException implements Exception {
23 // TODO(floitsch): clean up spawn exception. 25 // TODO(floitsch): clean up spawn exception.
24 const IsolateSpawnException(String this._s); 26 const IsolateSpawnException(String this._s);
25 String toString() => "IsolateSpawnException: '$_s'"; 27 String toString() => "IsolateSpawnException: '$_s'";
26 final String _s; 28 final String _s;
27 } 29 }
28 30
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 const _IsolateUnhandledException(this.message, this.source, this.stackTrace); 234 const _IsolateUnhandledException(this.message, this.source, this.stackTrace);
233 235
234 String toString() { 236 String toString() {
235 return 'IsolateUnhandledException: exception while handling message: ' 237 return 'IsolateUnhandledException: exception while handling message: '
236 '${message} \n ' 238 '${message} \n '
237 '${source.toString().replaceAll("\n", "\n ")}\n' 239 '${source.toString().replaceAll("\n", "\n ")}\n'
238 'original stack trace:\n ' 240 'original stack trace:\n '
239 '${stackTrace.toString().replaceAll("\n","\n ")}'; 241 '${stackTrace.toString().replaceAll("\n","\n ")}';
240 } 242 }
241 } 243 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698