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

Unified Diff: pkg/barback/lib/src/utils/cancelable_future.dart

Issue 306773002: Fix a bug where barback transformers would produce stale output. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: pkg/barback/lib/src/utils/cancelable_future.dart
diff --git a/pkg/barback/lib/src/utils/cancelable_future.dart b/pkg/barback/lib/src/utils/cancelable_future.dart
index ff723b287f8f86ee90dd2ea69f937108e6cf80fa..64d2b5fa203e4eb9c98a7039a504325adfb7ccbc 100644
--- a/pkg/barback/lib/src/utils/cancelable_future.dart
+++ b/pkg/barback/lib/src/utils/cancelable_future.dart
@@ -14,7 +14,7 @@ import 'dart:async';
/// running.
class CancelableFuture<T> implements Future<T> {
bool _canceled = false;
- final _completer = new Completer<T>();
+ final _completer = new Completer<T>.sync();
CancelableFuture(Future<T> inner) {
inner.then((result) {

Powered by Google App Engine
This is Rietveld 408576698