OLD | NEW |
1 // Copyright (c) 2015, the Fletch project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dartino 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.md file. | 3 // BSD-style license that can be found in the LICENSE.md file. |
4 | 4 |
5 // FletchDebuggerCommands=b print,r,c,fibers,t internal,bt,fibers,t internal,bt,
c,c,fibers,c | 5 // FletchDebuggerCommands=b print,r,c,fibers,t internal,bt,fibers,t internal,bt,
c,c,fibers,c |
6 | 6 |
7 import 'dart:fletch'; | 7 import 'dart:fletch'; |
8 | 8 |
9 run(marker) { | 9 run(marker) { |
10 for (int i = 0; i < 2; i++) { | 10 for (int i = 0; i < 2; i++) { |
11 Fiber.yield(); | 11 Fiber.yield(); |
12 print('$marker ${i}'); | 12 print('$marker ${i}'); |
13 } | 13 } |
14 } | 14 } |
15 | 15 |
16 main() { | 16 main() { |
17 Fiber.fork(() { run('a'); }); | 17 Fiber.fork(() { run('a'); }); |
18 Fiber.fork(() { run('b'); }); | 18 Fiber.fork(() { run('b'); }); |
19 } | 19 } |
OLD | NEW |