Update to make the code work with strong-mode clean Zone API.
diff --git a/pkgs/pool/CHANGELOG.md b/pkgs/pool/CHANGELOG.md index 80d54c7..63cf006 100644 --- a/pkgs/pool/CHANGELOG.md +++ b/pkgs/pool/CHANGELOG.md
@@ -1,3 +1,7 @@ +## 1.3.2 + +* Update to make the code work with strong-mode clean Zone API. + ## 1.3.1 * Fix the type annotation of `Pool.withResource()` to indicate that it takes
diff --git a/pkgs/pool/lib/pool.dart b/pkgs/pool/lib/pool.dart index 04aaaea..d81386f 100644 --- a/pkgs/pool/lib/pool.dart +++ b/pkgs/pool/lib/pool.dart
@@ -183,8 +183,9 @@ _allocatedResources--; if (_allocatedResources == 0) _closeGroup.close(); } else { - _onReleaseCallbacks.add( - Zone.current.bindCallback(onRelease, runGuarded: false)); + var zone = Zone.current; + var registered = zone.registerCallback(onRelease); + _onReleaseCallbacks.add(() => zone.run(registered)); } }
diff --git a/pkgs/pool/pubspec.yaml b/pkgs/pool/pubspec.yaml index 8efc8e5..4a8271b 100644 --- a/pkgs/pool/pubspec.yaml +++ b/pkgs/pool/pubspec.yaml
@@ -1,5 +1,5 @@ name: pool -version: 1.3.1 +version: 1.3.2 author: Dart Team <misc@dartlang.org> description: A class for managing a finite pool of resources. homepage: https://github.com/dart-lang/pool