Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | |
| 2 // for details. All rights reserved. Use of this source code is governed by a | |
| 3 // BSD-style license that can be found in the LICENSE file. | |
| 4 | |
| 5 | |
| 6 // 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/
| |
| 7 | |
| 8 class _IsolateNatives { | |
| 9 static Future<SendPort> spawn(Isolate isolate, bool isLight) { | |
| 10 Completer<SendPort> completer = new Completer<SendPort>(); | |
| 11 SendPort port = _start(isolate, isLight); | |
| 12 completer.complete(port); | |
| 13 return completer.future; | |
| 14 } | |
| 15 | |
| 16 // Starts a new isolate calling the run method on a new instance of the | |
| 17 // remote class's type. | |
| 18 // Returns the send port which is passed to the newly created isolate. | |
| 19 // This method is being dispatched to from the public core library code. | |
| 20 static SendPort _start(Isolate isolate, bool light) | |
| 21 native "IsolateNatives_start"; | |
| 22 } | |
| 23 | |
| 24 // This file seems incomplete, the vm build process will put together this with | |
| 25 // isolate_api.dart, and runtime/ports.dart | |
| 26 | |
| 27 class _IsolateFactory { | |
| 28 | |
| 29 factory Isolate2.fromCode(Function topLevelFunction) { | |
| 30 throw new NotImplementedException(); | |
| 31 } | |
| 32 | |
| 33 factory Isolate2.fromUri(String uri) { | |
| 34 throw new NotImplementedException(); | |
| 35 } | |
| 36 } | |
| OLD | NEW |