diff --git a/CHANGELOG.md b/CHANGELOG.md index 411bfe56c..13ed72810 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## 1.63.5 + +### Embedded Sass + +* Fix a deadlock when running at high concurrency on 32-bit systems. + ## 1.63.4 ### JavaScript API diff --git a/lib/src/embedded/isolate_dispatcher.dart b/lib/src/embedded/isolate_dispatcher.dart index 71c4b041a..0fac523ed 100644 --- a/lib/src/embedded/isolate_dispatcher.dart +++ b/lib/src/embedded/isolate_dispatcher.dart @@ -3,6 +3,7 @@ // https://opensource.org/licenses/MIT. import 'dart:async'; +import 'dart:ffi'; import 'dart:io'; import 'dart:isolate'; import 'dart:typed_data'; @@ -51,9 +52,10 @@ class IsolateDispatcher { /// A pool controlling how many isolates (and thus concurrent compilations) /// may be live at once. /// - /// More than 15 concurrent `waitFor()` calls seems to deadlock the Dart VM, - /// even across isolates. See sass/dart-sass#1959. - final _isolatePool = Pool(15); + /// More than MaxMutatorThreadCount isolates in the same isolate group + /// can deadlock the Dart VM. + /// See https://github.com/sass/dart-sass/pull/2019 + final _isolatePool = Pool(sizeOf() <= 4 ? 7 : 15); /// Whether the underlying channel has closed and the dispatcher is shutting /// down. diff --git a/pubspec.yaml b/pubspec.yaml index 17d19a9db..c6da3a2f1 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: sass -version: 1.63.4 +version: 1.63.5-dev description: A Sass implementation in Dart. homepage: https://github.com/sass/dart-sass