Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1297)

Unified Diff: tests/standalone/issue14236_source.dart

Issue 27215002: Very simple version of Isolates. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/standalone/io/testing_server.dart ('k') | tests/standalone/issue14236_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/issue14236_source.dart
diff --git a/tests/standalone/issue14236_source.dart b/tests/standalone/issue14236_source.dart
index 4d2dc693280fcf31c87aa6ef758c3681b9d7f539..3b9e1641c9d0a9db6f50e7fdc5cab3c5e38a50b1 100644
--- a/tests/standalone/issue14236_source.dart
+++ b/tests/standalone/issue14236_source.dart
@@ -13,16 +13,18 @@ import 'dart:isolate';
import "package:expect/expect.dart";
/*
-test() {
- port.receive((msg, reply) => reply.send(msg));
+test(SendPort replyTo) {
+ replyTo.send("from Isolate");
}
main() {
+ asyncStart();
ReceivePort port = new ReceivePort();
- port.receive((msg, reply) => port.close());
-
- SendPort s = spawnFunction(test);
- s.send('hi', port.toSendPort());
+ Isolate.spawn(test, port.sendPort);
+ port.first.then((msg) {
+ Expect.equals("from Isolate", msg);
+ asyncEnd();
+ });
}
*/
« no previous file with comments | « tests/standalone/io/testing_server.dart ('k') | tests/standalone/issue14236_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698