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

Unified Diff: runtime/lib/isolate.dart

Issue 9691005: Implement spawnFunction from the new isolate api. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 9 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
Index: runtime/lib/isolate.dart
===================================================================
--- runtime/lib/isolate.dart (revision 5367)
+++ runtime/lib/isolate.dart (working copy)
@@ -155,14 +155,21 @@
native "IsolateNatives_start";
}
-// TODO(sigmund,turnidge): implement
+_getPortInternal() native "isolate_getPortInternal";
-SendPort _spawnFunction(void topLevelFunction()) {
- throw new NotImplementedException();
+ReceivePort _portInternal;
+
+ReceivePort get _port() {
+ if (_portInternal) {
+ return _portInternal;
+ }
+ _portInternal = _getPortInternal();
+ return _portInternal;
}
+_spawnFunction(void topLevelFunction()) native "isolate_spawnFunction";
+
+// TODO(sigmund,turnidge): implement
SendPort _spawnUri(String uri) {
throw new NotImplementedException();
}
-
-ReceivePort _port = null;

Powered by Google App Engine
This is Rietveld 408576698