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

Unified Diff: lib/isolate/runtime/isolateimpl.dart

Issue 9422019: isolates refactor: this change introduces 'dart:isolate' as a library. This is a (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: '' Created 8 years, 10 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: lib/isolate/runtime/isolateimpl.dart
diff --git a/lib/isolate/runtime/isolateimpl.dart b/lib/isolate/runtime/isolateimpl.dart
new file mode 100644
index 0000000000000000000000000000000000000000..e15dce2128459ce4b639743309bfe94444a52ae6
--- /dev/null
+++ b/lib/isolate/runtime/isolateimpl.dart
@@ -0,0 +1,36 @@
+// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+// Dart isolate's API and implementation for the dartvm.
siva 2012/02/22 00:58:20 I would prefer if we did not move this VM specific
Siggi Cherem (dart-lang) 2012/02/22 19:18:50 Done. I moved this back under runtime/lib/
+
+class _IsolateNatives {
+ static Future<SendPort> spawn(Isolate isolate, bool isLight) {
+ Completer<SendPort> completer = new Completer<SendPort>();
+ SendPort port = _start(isolate, isLight);
+ completer.complete(port);
+ return completer.future;
+ }
+
+ // Starts a new isolate calling the run method on a new instance of the
+ // remote class's type.
+ // Returns the send port which is passed to the newly created isolate.
+ // This method is being dispatched to from the public core library code.
+ static SendPort _start(Isolate isolate, bool light)
+ native "IsolateNatives_start";
+}
+
+// This file seems incomplete, the vm build process will put together this with
+// isolate_api.dart, and runtime/ports.dart
+
+class _IsolateFactory {
+
+ factory Isolate2.fromCode(Function topLevelFunction) {
+ throw new NotImplementedException();
+ }
+
+ factory Isolate2.fromUri(String uri) {
+ throw new NotImplementedException();
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698