mirror of
https://github.com/dart-lang/sdk
synced 2024-09-18 21:21:18 +00:00
c38de04d0c
BUG= R=sgjesse@google.com Review URL: https://codereview.chromium.org//46063010 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29651 260f80e4-7a28-3924-810f-c04153c831b5
35 lines
896 B
Dart
35 lines
896 B
Dart
// Copyright (c) 2013, 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 test program for testing typed data.
|
|
|
|
// Library tag to be able to run in html test framework.
|
|
library TypedDataIsolateTest;
|
|
|
|
import 'dart:io';
|
|
import 'dart:isolate';
|
|
import 'package:async_helper/async_helper.dart';
|
|
|
|
second(message) {
|
|
var data = message[0];
|
|
var replyTo = message[1];
|
|
print('got data');
|
|
print(data);
|
|
print('printed data');
|
|
replyTo.send('OK');
|
|
}
|
|
|
|
main() {
|
|
asyncStart();
|
|
new File(Platform.script.toFilePath()).readAsBytes().then((List<int> data) {
|
|
var response = new ReceivePort();
|
|
var remote = Isolate.spawn(second, [data, response.sendPort]);
|
|
response.first.then((reply) {
|
|
print('got reply');
|
|
asyncEnd();
|
|
});
|
|
});
|
|
}
|
|
|