OLD | NEW |
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 Loading... |
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 } |
OLD | NEW |