| 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 library dart.isolate; | 11 library dart.isolate; |
| 12 | 12 |
| 13 import "dart:async"; | 13 import "dart:async"; |
| 14 | |
| 15 part "capability.dart"; | |
| 16 import 'dart:_js_helper' show patch; | 14 import 'dart:_js_helper' show patch; |
| 17 import 'dart:_isolate_helper' show CapabilityImpl, | 15 import 'dart:_isolate_helper' show CapabilityImpl, |
| 18 CloseToken, | 16 CloseToken, |
| 19 IsolateNatives, | 17 IsolateNatives, |
| 20 JsIsolateSink, | 18 JsIsolateSink, |
| 21 ReceivePortImpl, | 19 ReceivePortImpl, |
| 22 RawReceivePortImpl; | 20 RawReceivePortImpl; |
| 23 | 21 |
| 22 part "capability.dart"; |
| 23 |
| 24 /** | 24 /** |
| 25 * Thrown when an isolate cannot be created. | 25 * Thrown when an isolate cannot be created. |
| 26 */ | 26 */ |
| 27 class IsolateSpawnException implements Exception { | 27 class IsolateSpawnException implements Exception { |
| 28 /** Error message reported by the spawn operation. */ | 28 /** Error message reported by the spawn operation. */ |
| 29 final String message; | 29 final String message; |
| 30 IsolateSpawnException(this.message); | 30 IsolateSpawnException(this.message); |
| 31 String toString() => "IsolateSpawnException: $message"; | 31 String toString() => "IsolateSpawnException: $message"; |
| 32 } | 32 } |
| 33 | 33 |
| (...skipping 660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 694 : _description = description, | 694 : _description = description, |
| 695 stackTrace = new _RemoteStackTrace(stackDescription); | 695 stackTrace = new _RemoteStackTrace(stackDescription); |
| 696 String toString() => _description; | 696 String toString() => _description; |
| 697 } | 697 } |
| 698 | 698 |
| 699 class _RemoteStackTrace implements StackTrace { | 699 class _RemoteStackTrace implements StackTrace { |
| 700 String _trace; | 700 String _trace; |
| 701 _RemoteStackTrace(this._trace); | 701 _RemoteStackTrace(this._trace); |
| 702 String toString() => _trace; | 702 String toString() => _trace; |
| 703 } | 703 } |
| OLD | NEW |