| Index: frog/lib/isolate.dart
|
| diff --git a/frog/lib/isolate.dart b/frog/lib/isolate.dart
|
| index 0680c740d1c4e3fd392009d8aadf8cdc4bf54dbf..ce13bf00de404592979a99b12ee2f3a0250bc026 100644
|
| --- a/frog/lib/isolate.dart
|
| +++ b/frog/lib/isolate.dart
|
| @@ -153,15 +153,15 @@ class ReceivePortSingleShotImpl implements ReceivePort {
|
| final String _SPAWNED_SIGNAL = "spawned";
|
|
|
| class IsolateNatives {
|
| - static Promise<SendPort> spawn(Isolate isolate, bool isLight) {
|
| - Promise<SendPort> result = new Promise<SendPort>();
|
| + static Future<SendPort> spawn(Isolate isolate, bool isLight) {
|
| + Completer<SendPort> completer = new Completer<SendPort>();
|
| ReceivePort port = new ReceivePort.singleShot();
|
| port.receive((msg, SendPort replyPort) {
|
| assert(msg == _SPAWNED_SIGNAL);
|
| - result.complete(replyPort);
|
| + completer.complete(replyPort);
|
| });
|
| _spawn(isolate, isLight, port.toSendPort());
|
| - return result;
|
| + return completer.future;
|
| }
|
|
|
| static SendPort _spawn(Isolate isolate, bool light, SendPort port) native;
|
|
|