| 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 class IsolateSpawnException implements Exception { | 5 class IsolateSpawnException implements Exception { |
| 6 const IsolateSpawnException(String this._s); | 6 const IsolateSpawnException(String this._s); |
| 7 String toString() => "IsolateSpawnException: '$_s'"; | 7 String toString() => "IsolateSpawnException: '$_s'"; |
| 8 final String _s; | 8 final String _s; |
| 9 } | 9 } |
| 10 | 10 |
| 11 /** | 11 /** |
| 12 * The initial [ReceivePort] available by default for this isolate. This | 12 * The initial [ReceivePort] available by default for this isolate. This |
| 13 * [ReceivePort] is created automatically and it is commonly used to establish | 13 * [ReceivePort] is created automatically and it is commonly used to establish |
| 14 * the first communication between isolates (see [spawnFunction] and | 14 * the first communication between isolates (see [spawnFunction] and |
| 15 * [spawnUri]). | 15 * [spawnUri]). |
| 16 */ | 16 */ |
| 17 external ReceivePort get port(); | 17 external ReceivePort get port; |
| 18 | 18 |
| 19 /** | 19 /** |
| 20 * Creates and spawns an isolate that shares the same code as the current | 20 * Creates and spawns an isolate that shares the same code as the current |
| 21 * isolate, but that starts from [topLevelFunction]. The [topLevelFunction] | 21 * isolate, but that starts from [topLevelFunction]. The [topLevelFunction] |
| 22 * argument must be a static top-level function or a static method that takes no | 22 * argument must be a static top-level function or a static method that takes no |
| 23 * arguments. It is illegal to pass a function closure. | 23 * arguments. It is illegal to pass a function closure. |
| 24 * | 24 * |
| 25 * When any isolate starts (even the main script of the application), a default | 25 * When any isolate starts (even the main script of the application), a default |
| 26 * [ReceivePort] is created for it. This port is available from the top-level | 26 * [ReceivePort] is created for it. This port is available from the top-level |
| 27 * getter [port] defined in this library. | 27 * getter [port] defined in this library. |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 // TODO(kasperl): Document this. | 139 // TODO(kasperl): Document this. |
| 140 abstract class SendPortSync { | 140 abstract class SendPortSync { |
| 141 | 141 |
| 142 callSync(var message); | 142 callSync(var message); |
| 143 | 143 |
| 144 } | 144 } |
| 145 | 145 |
| 146 class _ReceivePortFactory { | 146 class _ReceivePortFactory { |
| 147 external factory ReceivePort(); | 147 external factory ReceivePort(); |
| 148 } | 148 } |
| OLD | NEW |