| 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 library dart.fletch; | 5 library dart.fletch; |
| 6 | 6 |
| 7 import 'dart:fletch._system' as fletch; | 7 import 'dart:fletch._system' as fletch; |
| 8 | 8 |
| 9 /// Fibers are lightweight co-operative multitask units of execution. They | 9 /// Fibers are lightweight co-operative multitask units of execution. They |
| 10 /// are scheduled on top of OS-level threads, but they are cheap to create | 10 /// are scheduled on top of OS-level threads, but they are cheap to create |
| 11 /// and block. | 11 /// and block. |
| (...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 550 // TODO(sigurdm): Move this function? | 550 // TODO(sigurdm): Move this function? |
| 551 Channel sleep(int milliseconds) { | 551 Channel sleep(int milliseconds) { |
| 552 if (milliseconds is! int) throw new ArgumentError(milliseconds); | 552 if (milliseconds is! int) throw new ArgumentError(milliseconds); |
| 553 Channel channel = new Channel(); | 553 Channel channel = new Channel(); |
| 554 Port port = new Port(channel); | 554 Port port = new Port(channel); |
| 555 _sleep(milliseconds, port); | 555 _sleep(milliseconds, port); |
| 556 return channel; | 556 return channel; |
| 557 } | 557 } |
| 558 | 558 |
| 559 @fletch.native external void _sleep(int milliseconds, Port port); | 559 @fletch.native external void _sleep(int milliseconds, Port port); |
| OLD | NEW |