OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2014, 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 import "dart:async"; |
| 6 import "dart:isolate"; |
| 7 |
| 8 // This type corresponds to the VM-internal class LibraryPrefix. |
| 9 |
| 10 class _LibraryPrefix { |
| 11 _load() native "LibraryPrefix_load"; |
| 12 |
| 13 loadLibrary() { |
| 14 var completer = new Completer<bool>(); |
| 15 var port = new RawReceivePort(); |
| 16 port.handler = (_) { |
| 17 this._load(); |
| 18 completer.complete(true); |
| 19 port.close(); |
| 20 }; |
| 21 port.sendPort.send(1); |
| 22 return completer.future; |
| 23 } |
| 24 } |
OLD | NEW |