Skip to content

Commit

Permalink
Merge pull request flutter#12 from dart-lang/future
Browse files Browse the repository at this point in the history
Changes to eliminate future flattening
  • Loading branch information
keertip authored Jan 4, 2018
2 parents 6c9b5e9 + d01339d commit e9536fd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.3.4

* Modify code to eliminate Future flattening.

## 1.3.3

* Declare support for `async` 2.0.0.
Expand Down
2 changes: 1 addition & 1 deletion lib/pool.dart
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ class Pool {
// synchronously in case the pool is closed immediately afterwards. Async
// functions have an asynchronous gap between calling and running the body,
// and [close] could be called during that gap. See #3.
return request().then<Future<T>>((resource) {
return request().then((resource) {
return new Future<T>.sync(callback).whenComplete(resource.release);
});
}
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: pool
version: 1.3.3
version: 1.3.4
author: Dart Team <misc@dartlang.org>
description: A class for managing a finite pool of resources.
homepage: https://github.com/dart-lang/pool
Expand Down

0 comments on commit e9536fd

Please sign in to comment.