| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 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 | 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. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 class ReceivePortFactory { | 5 class ReceivePortFactory { |
| 6 factory ReceivePort() { | 6 factory ReceivePort() { |
| 7 return new ReceivePortImpl(); | 7 return new ReceivePortImpl(); |
| 8 } | 8 } |
| 9 | 9 |
| 10 factory ReceivePort.singleShot() { | 10 factory ReceivePort.singleShot() { |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 result.complete(port); | 141 result.complete(port); |
| 142 return result; | 142 return result; |
| 143 } | 143 } |
| 144 | 144 |
| 145 // Starts a new isolate calling the run method on a new instance of the | 145 // Starts a new isolate calling the run method on a new instance of the |
| 146 // remote class's type. | 146 // remote class's type. |
| 147 // Returns the send port which is passed to the newly created isolate. | 147 // Returns the send port which is passed to the newly created isolate. |
| 148 // This method is being dispatched to from the public core library code. | 148 // This method is being dispatched to from the public core library code. |
| 149 static SendPort _start(Isolate isolate, bool light) | 149 static SendPort _start(Isolate isolate, bool light) |
| 150 native "IsolateNatives_start"; | 150 native "IsolateNatives_start"; |
| 151 | |
| 152 // The VM knows in which isolate the function must be run, therefore | |
| 153 // there is no need for wrapping it. | |
| 154 static Function bind(Function f) { return f; } | |
| 155 } | 151 } |
| OLD | NEW |