| Index: samples/sample_extension/sample_asynchronous_extension.dart
|
| diff --git a/samples/sample_extension/sample_asynchronous_extension.dart b/samples/sample_extension/sample_asynchronous_extension.dart
|
| index 3459b440aa997ca6642a1b52f021ae6e5da04402..c93d628ab07b1d4bc2c008dc7b880048884c1a12 100644
|
| --- a/samples/sample_extension/sample_asynchronous_extension.dart
|
| +++ b/samples/sample_extension/sample_asynchronous_extension.dart
|
| @@ -12,11 +12,14 @@ import 'dart-ext:sample_extension';
|
| class RandomArray {
|
| static SendPort _port;
|
|
|
| - Future<List<int> > randomArray(int seed, int length) {
|
| + Future<List<int>> randomArray(int seed, int length) {
|
| var args = new List(2);
|
| args[0] = seed;
|
| args[1] = length;
|
| - return _servicePort.call(args).then((result) {
|
| + ReceivePort receivePort = new ReceivePort();
|
| + _servicePort.send(args, receivePort.sendPort);
|
| + return receivePort.first.then((result) {
|
| + receivePort.close();
|
| if (result != null) {
|
| return result;
|
| } else {
|
|
|