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

Unified Diff: lib/isolate/base.dart

Issue 10828410: Unify dart:isolate. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix mapping to dart:isolate. Created 8 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/config/import_vm.config ('k') | lib/isolate/dart2js/compiler_hooks.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/isolate/base.dart
diff --git a/lib/isolate/isolate_api.dart b/lib/isolate/base.dart
similarity index 96%
rename from lib/isolate/isolate_api.dart
rename to lib/isolate/base.dart
index 010007e2b5bd63f8ae59a3420ec226f2593fa35c..b5d92bfcd43e6c4df66ac5eb4e55c641f6c44b5f 100644
--- a/lib/isolate/isolate_api.dart
+++ b/lib/isolate/base.dart
@@ -14,7 +14,7 @@ class IsolateSpawnException implements Exception {
* the first communication between isolates (see [spawnFunction] and
* [spawnUri]).
*/
-ReceivePort get port() => _port;
+external ReceivePort get port();
/**
* Creates and spawns an isolate that shares the same code as the current
@@ -32,9 +32,7 @@ ReceivePort get port() => _port;
* See comments at the top of this library for more details.
*/
// Note this feature is not yet available in the dartvm.
-SendPort spawnFunction(void topLevelFunction()) {
- return _spawnFunction(topLevelFunction);
-}
+external SendPort spawnFunction(void topLevelFunction());
/**
* Creates and spawns an isolate whose code is available at [uri]. Like with
@@ -43,9 +41,7 @@ SendPort spawnFunction(void topLevelFunction()) {
*
* See comments at the top of this library for more details.
*/
-SendPort spawnUri(String uri) {
- return _spawnUri(uri);
-}
+external SendPort spawnUri(String uri);
/**
* [SendPort]s are created from [ReceivePort]s. Any message sent through
@@ -146,3 +142,7 @@ interface SendPortSync {
callSync(var message);
}
+
+class _ReceivePortFactory {
+ external factory ReceivePort();
+}
« no previous file with comments | « lib/config/import_vm.config ('k') | lib/isolate/dart2js/compiler_hooks.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698