| Index: lib/isolate/isolate_api.dart
|
| diff --git a/lib/isolate/base.dart b/lib/isolate/isolate_api.dart
|
| similarity index 96%
|
| rename from lib/isolate/base.dart
|
| rename to lib/isolate/isolate_api.dart
|
| index b5d92bfcd43e6c4df66ac5eb4e55c641f6c44b5f..010007e2b5bd63f8ae59a3420ec226f2593fa35c 100644
|
| --- a/lib/isolate/base.dart
|
| +++ b/lib/isolate/isolate_api.dart
|
| @@ -14,7 +14,7 @@ class IsolateSpawnException implements Exception {
|
| * the first communication between isolates (see [spawnFunction] and
|
| * [spawnUri]).
|
| */
|
| -external ReceivePort get port();
|
| +ReceivePort get port() => _port;
|
|
|
| /**
|
| * Creates and spawns an isolate that shares the same code as the current
|
| @@ -32,7 +32,9 @@ external ReceivePort get port();
|
| * See comments at the top of this library for more details.
|
| */
|
| // Note this feature is not yet available in the dartvm.
|
| -external SendPort spawnFunction(void topLevelFunction());
|
| +SendPort spawnFunction(void topLevelFunction()) {
|
| + return _spawnFunction(topLevelFunction);
|
| +}
|
|
|
| /**
|
| * Creates and spawns an isolate whose code is available at [uri]. Like with
|
| @@ -41,7 +43,9 @@ external SendPort spawnFunction(void topLevelFunction());
|
| *
|
| * See comments at the top of this library for more details.
|
| */
|
| -external SendPort spawnUri(String uri);
|
| +SendPort spawnUri(String uri) {
|
| + return _spawnUri(uri);
|
| +}
|
|
|
| /**
|
| * [SendPort]s are created from [ReceivePort]s. Any message sent through
|
| @@ -142,7 +146,3 @@ interface SendPortSync {
|
| callSync(var message);
|
|
|
| }
|
| -
|
| -class _ReceivePortFactory {
|
| - external factory ReceivePort();
|
| -}
|
|
|