| OLD | NEW |
| 1 // Copyright (c) 2016, the Fletch project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 /// Simple test that timers and event-handlers work. | 5 /// Simple test that timers and event-handlers work. |
| 6 /// | 6 /// |
| 7 /// For now we have to run this manually. | 7 /// For now we have to run this manually. |
| 8 | 8 |
| 9 import "dart:fletch"; | 9 import "dart:fletch"; |
| 10 import "dart:fletch.ffi"; | 10 import "dart:fletch.ffi"; |
| 11 import "dart:fletch.os" hide sleep; | 11 import "dart:fletch.os" hide sleep; |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 }); | 59 }); |
| 60 // Yield to let the newly created fiber start listening. | 60 // Yield to let the newly created fiber start listening. |
| 61 Fiber.yield(); | 61 Fiber.yield(); |
| 62 fibers.add(fiber); | 62 fibers.add(fiber); |
| 63 } | 63 } |
| 64 Fiber.yield(); | 64 Fiber.yield(); |
| 65 fibers.add(Fiber.fork(listenPort1)); | 65 fibers.add(Fiber.fork(listenPort1)); |
| 66 | 66 |
| 67 fibers.forEach((Fiber fiber) => fiber.join); | 67 fibers.forEach((Fiber fiber) => fiber.join); |
| 68 } | 68 } |
| OLD | NEW |