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

Side by Side Diff: tests/isolate/ping_pause_test.dart

Issue 1074223002: Update Isolate API. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix typo Created 5 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tests/isolate/ondone_test.dart ('k') | tests/isolate/ping_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import "dart:isolate"; 5 import "dart:isolate";
6 import "dart:async"; 6 import "dart:async";
7 import "package:expect/expect.dart"; 7 import "package:expect/expect.dart";
8 import "package:async_helper/async_helper.dart"; 8 import "package:async_helper/async_helper.dart";
9 9
10 isomain1(replyPort) { 10 isomain1(replyPort) {
(...skipping 23 matching lines...) Expand all
34 echoPort.send(4); 34 echoPort.send(4);
35 echoPort.send(3); 35 echoPort.send(3);
36 Capability resume = isolate.pause(); 36 Capability resume = isolate.pause();
37 var pingPort = new RawReceivePort(); 37 var pingPort = new RawReceivePort();
38 pingPort.handler = (_) { 38 pingPort.handler = (_) {
39 Expect.isTrue(result.length <= 2); 39 Expect.isTrue(result.length <= 2);
40 echoPort.send(0); 40 echoPort.send(0);
41 isolate.resume(resume); 41 isolate.resume(resume);
42 pingPort.close(); 42 pingPort.close();
43 }; 43 };
44 isolate.ping(pingPort.sendPort, Isolate.BEFORE_NEXT_EVENT); 44 isolate.ping(pingPort.sendPort, priority: Isolate.BEFORE_NEXT_EVENT);
45 echoPort.send(2); 45 echoPort.send(2);
46 echoPort.send(1); 46 echoPort.send(1);
47 }); 47 });
48 }); 48 });
49 } 49 }
OLDNEW
« no previous file with comments | « tests/isolate/ondone_test.dart ('k') | tests/isolate/ping_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698