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

Unified Diff: pkg/serialization/test/serialization_test.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
Index: pkg/serialization/test/serialization_test.dart
diff --git a/pkg/serialization/test/serialization_test.dart b/pkg/serialization/test/serialization_test.dart
index 83232c91ace606b1a8c3158892a1e0bbec8ecc0a..4d5ebf4501ce7f55897eff3df88422349d8868ac 100644
--- a/pkg/serialization/test/serialization_test.dart
+++ b/pkg/serialization/test/serialization_test.dart
@@ -549,8 +549,9 @@ void main() {
n3.parent = n1;
var s = nodeSerializerReflective(n1);
var output = s.write(n2);
- var port = spawnFunction(echo);
- return port.call(output).then(verify);
+ ReceivePort port = new ReceivePort();
+ var remote = Isolate.spawn(echo, [output, port.sendPort]);
+ port.first.then(verify);
});
}
@@ -808,8 +809,8 @@ class PersonRuleReturningMapWithNonStringKey extends CustomRule {
* Function used in an isolate to make sure that the output passes through
* isolate serialization properly.
*/
-void echo() {
- port.receive((msg, reply) {
- reply.send(msg);
- });
+void echo(initialMessage) {
+ var msg = initialMessage[0];
+ var reply = initialMessage[1];
+ reply.send(msg);
}
« no previous file with comments | « pkg/scheduled_test/test/scheduled_test/wrap_future_test.dart ('k') | pkg/unittest/test/unittest_test_utils.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698