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

Unified Diff: lib/isolate/isolate_api.dart

Issue 10827436: Revert "Unify dart:isolate." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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/isolate/isolate.dart ('k') | lib/isolate/isolate_compiler.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
-}
« no previous file with comments | « lib/isolate/isolate.dart ('k') | lib/isolate/isolate_compiler.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698