Chromium Code Reviews| 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(); |
| + } |
| +} |