OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 library barback.graph.group_runner; | 5 library barback.graph.group_runner; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 | 8 |
9 import '../asset/asset_node.dart'; | 9 import '../asset/asset_node.dart'; |
10 import '../log.dart'; | 10 import '../log.dart'; |
(...skipping 17 matching lines...) Expand all Loading... |
28 | 28 |
29 /// How far along [this] is in processing its assets. | 29 /// How far along [this] is in processing its assets. |
30 NodeStatus get status { | 30 NodeStatus get status { |
31 // Just check the last phase, since it will check all the previous phases | 31 // Just check the last phase, since it will check all the previous phases |
32 // itself. | 32 // itself. |
33 return _phases.last.status; | 33 return _phases.last.status; |
34 } | 34 } |
35 | 35 |
36 /// A stream that emits an event every time the group's status changes. | 36 /// A stream that emits an event every time the group's status changes. |
37 Stream<NodeStatus> get onStatusChange => _onStatusChange; | 37 Stream<NodeStatus> get onStatusChange => _onStatusChange; |
38 Stream _onStatusChange; | 38 Stream<NodeStatus> _onStatusChange; |
39 | 39 |
40 /// A stream that emits any new assets emitted by [this]. | 40 /// A stream that emits any new assets emitted by [this]. |
41 /// | 41 /// |
42 /// Assets are emitted synchronously to ensure that any changes are thoroughly | 42 /// Assets are emitted synchronously to ensure that any changes are thoroughly |
43 /// propagated as soon as they occur. | 43 /// propagated as soon as they occur. |
44 Stream<AssetNode> get onAsset => _onAsset; | 44 Stream<AssetNode> get onAsset => _onAsset; |
45 Stream<AssetNode> _onAsset; | 45 Stream<AssetNode> _onAsset; |
46 | 46 |
47 /// A stream that emits an event whenever any transforms in this group logs | 47 /// A stream that emits an event whenever any transforms in this group logs |
48 /// an entry. | 48 /// an entry. |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 /// Removes this group and all sub-phases within it. | 80 /// Removes this group and all sub-phases within it. |
81 void remove() { | 81 void remove() { |
82 _onLogPool.close(); | 82 _onLogPool.close(); |
83 for (var phase in _phases) { | 83 for (var phase in _phases) { |
84 phase.remove(); | 84 phase.remove(); |
85 } | 85 } |
86 } | 86 } |
87 | 87 |
88 String toString() => "group in phase $_location for $_group"; | 88 String toString() => "group in phase $_location for $_group"; |
89 } | 89 } |
OLD | NEW |