Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(131)

Side by Side Diff: pkg/barback/lib/src/transform_node.dart

Issue 241223005: Fix a deadlock bug with lazy transformer pipelining. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « pkg/barback/CHANGELOG.md ('k') | pkg/barback/test/package_graph/lazy_transformer_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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.transform_node; 5 library barback.transform_node;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'asset.dart'; 9 import 'asset.dart';
10 import 'asset_id.dart'; 10 import 'asset_id.dart';
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 (transformer is DeclaringTransformer && primary.deferred) { 137 (transformer is DeclaringTransformer && primary.deferred) {
138 _awaitingForce = deferred; 138 _awaitingForce = deferred;
139 139
140 _onLogPool.add(_onLogController.stream); 140 _onLogPool.add(_onLogController.stream);
141 141
142 _primarySubscription = primary.onStateChange.listen((state) { 142 _primarySubscription = primary.onStateChange.listen((state) {
143 if (state.isRemoved) { 143 if (state.isRemoved) {
144 remove(); 144 remove();
145 } else { 145 } else {
146 if (state.isDirty && !deferred) primary.force(); 146 if (state.isDirty && !deferred) primary.force();
147 // If this is deferred but applying, that means it must have been
148 // forced, so we should ensure its input remains forced as well.
149 if (deferred && _state == _State.APPLYING) primary.force();
147 _dirty(); 150 _dirty();
148 } 151 }
149 }); 152 });
150 153
151 _phaseSubscription = phase.previous.onAsset.listen((node) { 154 _phaseSubscription = phase.previous.onAsset.listen((node) {
152 if (!_missingInputs.contains(node.id)) return; 155 if (!_missingInputs.contains(node.id)) return;
153 if (!deferred) node.force(); 156 if (!deferred) node.force();
154 _dirty(); 157 _dirty();
155 }); 158 });
156 159
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
556 /// 559 ///
557 /// This will never transition to another state. 560 /// This will never transition to another state.
558 static final NOT_PRIMARY = const _State._("not primary"); 561 static final NOT_PRIMARY = const _State._("not primary");
559 562
560 final String name; 563 final String name;
561 564
562 const _State._(this.name); 565 const _State._(this.name);
563 566
564 String toString() => name; 567 String toString() => name;
565 } 568 }
OLDNEW
« no previous file with comments | « pkg/barback/CHANGELOG.md ('k') | pkg/barback/test/package_graph/lazy_transformer_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698