OLD | NEW |
1 // Copyright (c) 2015, the Fletch project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Fletch 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. |
12 class Fiber { | 12 class Fiber { |
13 | 13 |
14 // We keep track of the top of the coroutine stack and | 14 // We keep track of the top of the coroutine stack and |
15 // the list of other fibers that are waiting for this | 15 // the list of other fibers that are waiting for this |
16 // fiber to exit. | 16 // fiber to exit. |
17 Coroutine _coroutine; | 17 Coroutine _coroutine; |
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
481 class _ChannelEntry { | 481 class _ChannelEntry { |
482 final message; | 482 final message; |
483 final Fiber sender; | 483 final Fiber sender; |
484 _ChannelEntry next; | 484 _ChannelEntry next; |
485 _ChannelEntry(this.message, this.sender); | 485 _ChannelEntry(this.message, this.sender); |
486 } | 486 } |
487 | 487 |
488 bool isImmutable(Object object) => _isImmutable(object); | 488 bool isImmutable(Object object) => _isImmutable(object); |
489 | 489 |
490 @fletch.native external bool _isImmutable(String string); | 490 @fletch.native external bool _isImmutable(String string); |
OLD | NEW |