isolate_manager
Create long-lived isolates for single or multiple functions, with support for Web Workers (via an efficient generator) and WASM compilation.
6.3.2
11K downloads/mo
#2858 most downloaded on pub.dev
lamnhan066/isolate_manager
What this package is like to depend on
Last release 4 months ago
12 Apr 2026
Release timing varies
gaps range from 9 days to 5 months
Most releases are documented
notes for 63 of 81 stable releases
1 version withdrawn
withdrawn after publishing
4 years old
134 releases · first in 2022
6 releases in the last 12 months
see the full history below
Release timeline
134 releases · Jun 2022 to Apr 2026Releases
latest 60 of 134-
6.3.212 Apr 2026 -
6.3.130 Mar 2026Release notes
Open source →- Fix the docs to clarify WASM transferables (
enableWasmTransferablesparameter) behavior in README.
- Fix the docs to clarify WASM transferables (
-
6.3.017 Mar 2026Release notes
Open source →- Documented support for using
--to pass arguments to the Dart compiler. - Update the workflows to compatible with
isolate_manager_generator^0.4.0. - Bump the dart analyzer to
^10.2.0. - Note for
isolate_manager_generator^0.4.0:-
BREAKING CHANGE: Removed
--omit-implicit-checksoption. Before (the option is added automatically):dart run isolate_manager_generatorAfter (the option is added manually):
dart run isolate_manager_generator -- --omit-implicit-checks -
BREAKING CHANGE: Removed unused source map generation and cleanup logic. Before (the option is added automatically):
dart run isolate_manager_generatorAfter (the option is added manually):
dart run isolate_manager_generator -- --no-source-maps -
BREAKING CHANGE: The
js.depsfiles are no longer removed automatically, and there is no helper available for this change. -
Bump the dart analyzer to
^10.0.0.
-
- Documented support for using
-
6.2.007 Mar 2026Release notes
Open source →- Add cross-platform transferables support (fixes #56, thanks to @kartikey321).
- Add
enableWasmTransferablesparameter to automatically omit transferables on WASM targets for better performance. - Update
queueStrategyandworkerConvertertypes for better null safety (fixes #54). - Improve benchmark scripts.
- Update README.
-
6.1.219 Oct 2025 -
6.1.117 Oct 2025Release notes
Open source →- Hide the
IsolateManagerCustomWorkerclass. - Strip --add-generator flag before launching generator.
- Hide the
-
6.1.001 Aug 2025Release notes
Open source →- Hide the
IsolateManagerController.initialParamsto avoid unexpected access. Because this attribute does nothing so I won't treat it as a breaking change. - Update the docs that related to deprecated
onInitial.
- Hide the
-
6.0.128 Jun 2025Release notes
Open source →- Update
IsolateManagerdocs forrunFunctionandrunCustomFunction. - Add
enableWasmConverterparameter toIsolateManager. - Update README.
- Update
-
6.0.003 Apr 2025Release notes
Open source →This major release incorporates numerous features, improvements, fixes, and breaking changes developed through the preceding release candidates. For a smooth transition, review the breaking changes section below. If you need information about deprecated methods before upgrading, please use
v6.0.0-rc.24.BREAKING CHANGES:
-
JS Recompilation Required: All JS worker files MUST be recompiled using
dart run isolate_manager:generate. This is necessary due to internal changes in data transfer mechanisms (introduced in rc.1) and worker naming conventions (introduced in rc.21). -
Generator Package: The generator functionality has been separated into the
isolate_manager_generatorpackage. This package MUST now be added to yourdev_dependenciesto use thedart run isolate_manager:generatecommand (separated in rc.10, made mandatory in rc.25). -
Deprecated Methods Removed: All methods previously marked as deprecated have been removed (introduced in rc.25). Please update your code to use their replacements.
-
ImTypeRefactoring:ImTypeand its subclasses (ImList,ImMap) have been refactored to prevent nullable values being wrapped directly, ensuring type safety. Use non-nullable types withinImType. -
QueueStrategyRenaming: TheQueueStrategyenums have been renamed for clarity:QueueStrategyUnlimited→UnlimitedStrategyQueueStrategyRemoveNewest→DropNewestStrategyQueueStrategyRemoveOldest→DropOldestStrategyQueueStrategyDiscardIncoming→RejectIncomingStrategy
-
Exception Type Change:
UnimplementedErrorthrown byImTypewrapper methods has been replaced with the more specificUnsupportedImTypeException. -
Shared Worker Naming: Shared workers now only accept the basename of the
workerName(changed in rc.21).
New Features:
IsolateManager.run: Added a method similar toIsolate.runthat supports execution on both VM Isolates and Web Workers.IsolateManager.runFunction: Added a method that automatically applies the correctworkerNamewhen running a function, simplifying shared worker usage.IsolateManager.runCustomFunction: Added support for custom isolate execution logic with optional callbacks and debug logging.ImTypeSystem: IntroducedImType(replacingIsolateType) and its subclasses (ImList,ImMap) to enforce type safety for parameters and return values, especially for Web Worker generation.ImTypeHelper Methods: Added convenient methods toImList(toIterable,toList,toDecodedIterable,toDecodedList) andImMap(toMap,toDecodedMap). ThetoDecoded...methods replace previoustoUnwrapped...methods.- Custom Exception Transfer: Added the ability to register custom exception classes (extending
IsolateException) that can be safely transferred between the main isolate and workers. ImTypeDebugging: AddedtoString()methods toImTypesubclasses for easier debugging.- [Experiment] Automatic Worker Mappings: Introduced an experimental flag (
--worker-mappings-experiment=lib/main.dart) for the generator to automatically createworkerMappings.
Improvements:
-
Performance:
- Improved data transfer performance between Web Workers and the main app by using
Mapinstead ofjson. - Enhanced performance by using native
dartifyandjstifyfor web interoperability. - Improved performance by optimizing
IsolateStatedetection. - Refactored multiple components for better performance.
- Used
assertfor logging messages, improving release mode performance.
- Improved data transfer performance between Web Workers and the main app by using
-
Error Handling:
- Generator (
dart run isolate_manager:generate) now returns a non-zero exit code on errors, improving CI/CD integration. - Wrap methods now throw
UnsupportedImTypeExceptionfor unsupported nullable types inImType,ImList,ImMap. - Improved error handling when transferring exceptions from Workers back to the main isolate.
- Improved worker function handling to avoid unnecessary wrapping when the worker is not available.
- Generator (
-
API & Usage:
- Uses
wrap/unwrapmethods (replacingencode/decode) forImTypedata handling. - Introduced
onInitcallback forIsolateManagerFunction.customFunction, replacing the previousonInitial. TheinitialParameterargument forIsolateManager.createCustomis no longer used withonInit. - Renamed internal type
CustomIsolateFunctiontoIsolateCustomFunctionfor clarity. workerNamefor shared workers now uses the latest mapping value dynamically, avoiding the need to restart after updates.- Improved
ImTypeequality and hash code implementations (replacingEquatable). - Added a converter helper for better
int,Iterable<int>,Set<int>,List<int>handling when compiling to WASM. ImTypecan now be declared asconst.- Supported computing nullable functions with nullable parameters using
IsolateManagerShared.
- Uses
-
Generator:
- Improved generator logic for creating worker mappings.
-
Code Quality:
- Adopted
very_good_analysisfor stricter linting rules. - Refactored codebase to remove redundant streams.
- Simplified internal code structures.
- General code cleanup.
- Adopted
Fixes:
- Fixed an issue in the shared isolate manager where
useWorkerwas true but noworkerNamewas provided. - Fixed an issue preventing subsequent task processing after an exception occurred.
- Correctly parse Dart native arguments during generation (Fixes #36).
- Fixed various typos in code and documentation.
Testing:
-
WASM Support: Added support for running tests on WASM (
dart test --platform=chrome --compiler dart2wasm) and updated CI workflows accordingly. Updated WASM benchmarks. -
Benchmarks: Rewrote and updated benchmarks, including results in the README.
-
Test Infrastructure:
- Added a local script (
test/bin/run.sh) to generate workers and run all tests. - Switched code coverage calculation from
flutter testtodart testfor accurate VM and Chrome testing. - Reorganized test file structures and simplified test flow.
- Added a local script (
-
General: Added and strengthened tests throughout the development cycle.
Dependencies:
- Requires
isolate_manager_generatorindev_dependenciesfor code generation. - Bumped
webpackage dependency to^1.0.0.
Documentation:
- Numerous improvements and updates to the README.
-
-
6.0.0+108 Apr 2025 -
6.0.0+211 Apr 2025Nothing published for this version
-
6.0.0-rc.2501 Apr 2025 pre-releaseRelease notes
Open source →- BREAKING CHANGE:
- The
isolate_manager_generatorMUST be added todev_dependenciesto usedart run isolate_manager:generate. - Remove all deprecated methods.
- The
- Return non-zero exit code when errors occur during the
dart run isolate_manager:generateexecution for better error handling in CI/CD pipelines.
- BREAKING CHANGE:
-
6.0.0-rc.25+102 Apr 2025 pre-release -
6.0.0-rc.2418 Mar 2025 pre-releaseRelease notes
Open source →- Rename the
QueueStrategys:QueueStrategyUnlimited→UnlimitedStrategyQueueStrategyRemoveNewest→DropNewestStrategyQueueStrategyRemoveOldest →DropOldestStrategyQueueStrategyDiscardIncoming→RejectIncomingStrategy
- Cleanup code.
- Remove .vscode.
- Rename the
-
6.0.0-rc.24+118 Mar 2025 pre-release -
6.0.0-rc.2312 Mar 2025 pre-release -
6.0.0-rc.2211 Mar 2025 pre-releaseRelease notes
Open source →- Update wrap methods to throw
UnsupportedImTypeExceptionwhen wrapping nullable types in ImType, ImList, and ImMap. - Update tests.
- Improve README.
- Update wrap methods to throw
-
6.0.0-rc.2109 Mar 2025 pre-releaseRelease notes
Open source →- The shared worker now only accept the basename of the
workerNameto compatible with the new generator (since v0.0.6). - Reorganize test file structures.
- BREADKING CHANGE: Recompile test workers.
- Simplify test flow.
- The shared worker now only accept the basename of the
-
6.0.0-rc.2008 Mar 2025 pre-releaseRelease notes
Open source →- Add, replace and deprecate the old methods:
ImMap.toUnwrappedMap->ImMap.toDecodedMapImList.toUnwrappedIterable->ImList.toDecodedIterableImList.toUnwrappedList->ImList.toDecodedList
- Update tests.
- Add, replace and deprecate the old methods:
-
6.0.0-rc.1908 Mar 2025 pre-releaseRelease notes
Open source →- BREAKING CHANGE Replace
UnimplementedErrorwithUnsupportedImTypeExceptioninImTypewrapper methods. - Improve worker function handling to avoid unnecessary wrapping when the worker is not available.
- Add
toString()method toImTypesubclasses for improved debugging. - Able to throw and catch
UnsupportedImTypeExceptioncorrectly across io, js and wasm. - Able to register the custom exceptions (extends
IsolateException) that can be safely transferred between isolates. - Update benchmark for WASM and update the result.
- Improve README.
- BREAKING CHANGE Replace
-
6.0.0-rc.1805 Mar 2025 pre-releaseRelease notes
Open source →-
Replace
IsolateTypes withImTypes and mark the old ones as deprecated. -
BREAKING CHANGE Refactor
ImTypeto prevent nullable values. -
Replace
encodewithwrapanddecodewithunwrapin IsolateType handling across and mark the old ones as deprecated. -
Add some useful methods:
ImList:toIterable,toList,toDecodedIterableandtoDecodedList.ImMap:toMapandtoDecodedMap.
-
Improve error handling when sending exception from Worker to main.
-
Improve the
ImTypeequality and hash code implementations to replaceEquatable. -
Add a converter helper to ensure proper type handling for
int,Iterable<int>,Set<int>andList<int>when compiling to WASM. -
Update tests and README.
-
Able to run tests on WASM via
dart test --platform=chrome --compiler dart2wasm. -
Update the workflows to run test on WASM.
-
-
6.0.0-rc.1703 Mar 2025 pre-releaseRelease notes
Open source →-
Fixes an issue in the shared isolate manager that
useWorkeris true but there is noworkerNameprovided. -
Add new
onInitcallback to replaceonInitialand make it as deprecated. -
Mark
initialParameterin theIsolateManager.createCustomas deprecated:Before:
void customIsolateFunction(dynamic params) { IsolateManangerFunction.customFunction( params, onInitial: (controller, initialParams) { // Do something here with the `initialParams`. }, ); } final isolate = IsolateManager.createCustom<R, P>( customIsolateFunction, initialParams: 'initialParams', );Now:
void customIsolateFunction(dynamic params) { IsolateManangerFunction.customFunction( params, onInit: (controller) { // Do something here with your own `initialParams` value. }, ); } final isolate = IsolateManager.createCustom<R, P>( customIsolateFunction, ); -
Improve tests.
-
-
6.0.0-rc.1601 Mar 2025 pre-releaseRelease notes
Open source →- Add
runCustomFunctionmethod to support custom isolate execution with optional callback and debug logging - The
workerNamenow gets the latest mapping value dynamically, avoid the need to recreate theIsolateManagerafter updates. - Refactored the codebase to remove redundant streams.
- Rename
CustomIsolateFunctiontoIsolateCustomFunction, update references and mark the old one as deprecated. - Improve README.
- Add
-
6.0.0-rc.16+101 Mar 2025 pre-release -
6.0.0-rc.1528 Feb 2025 pre-releaseRelease notes
Open source →- Refactored multiple components to improve performance.
- Rewrote benchmarks, regenerated JS worker for benchmarks, and updated benchmark results in README.
- Used
assertto log messages, enhancing performance in release mode. - Fixed several typos.
-
6.0.0-rc.1428 Feb 2025 pre-releaseRelease notes
Open source →- Add an
IsolateManager.runFunctionmethod that automatically applies the appropriateworkerNamewhen executing a function.
- Add an
-
6.0.0-rc.14+128 Feb 2025 pre-release -
6.0.0-rc.1325 Feb 2025 pre-release -
6.0.0-rc.1225 Feb 2025 pre-releaseRelease notes
Open source →- Add an
IsolateManager.runmethod that followsIsolate.runbut also supports Web Workers. - Allow
IsolateTypeto be declared as const. - Refactor to simplify internal code.
- Strengthen tests.
- Improve the README.
- Improve the Benchmarks.
- Add an
-
6.0.0-rc.1122 Jan 2025 pre-release -
6.0.0-rc.1021 Jan 2025 pre-release -
6.0.0-rc.918 Dec 2024 pre-releaseRelease notes
Open source →- Fixed issue that causes subsequent tasks not to be processed after receiving an exception.
-
6.0.0-rc.827 Nov 2024 pre-releaseRelease notes
Open source →- Able to compute a nullable function with a nullable parameter use IsolateManagerShared.
-
6.0.0-rc.725 Nov 2024 pre-release -
6.0.0-rc.606 Nov 2024 pre-releaseRelease notes
Open source →- Add
IsolateTypeto use for function parameters and return types to ensure that type is supported when generating a Worker. - Add
test/bin/run.shto generate and run all tests locally. - Use native
dartifyandjstifyto improve perfomances.
- Add
-
6.0.0-rc.527 Oct 2024 pre-releaseRelease notes
Open source →- Improve the generator to generate the worker mappings better.
- Update workflows to ensure backward compatibility.
-
6.0.0-rc.425 Oct 2024 pre-releaseRelease notes
Open source →- Correctly parse the dart native arguments (Fixes #36).
- [Experiment] Automatically generate the
workerMappingsby adding the--worker-mappings-experiment=lib/main.dartflag to the generator. - The code coverage is now using
dart testinstead offlutter testso we can correctly test the code on bothvmandchrome. - Improve the performaces by improving the way to detect the
IsolateState. - Improve tests.
-
6.0.0-rc.220 Oct 2024 pre-releaseRelease notes
Open source →- Bump the
webpackage to^1.0.0. - Bump the
analyzerpackage to^6.0.0. - Update the benchmark result.
- Bump the
-
6.0.0-rc.119 Oct 2024 pre-releaseRelease notes
Open source →- BREAKING CHANGE All the JS files MUST BE recompiled by running
dart run isolate_manager:generate. - Improve the data transfer performances between the Worker and the main App by replacing the
jsonwith theMapwhen sending and receiving data.
Although all tests are passed, many things will be refactored before version 6.0.0 is fully released.
- BREAKING CHANGE All the JS files MUST BE recompiled by running
-
5.7.518 Mar 2025Nothing published for this version
-
5.7.403 Mar 2025Nothing published for this version
-
5.7.323 Feb 2025Nothing published for this version
-
5.7.207 Feb 2025Nothing published for this version
-
5.7.2+107 Feb 2025Nothing published for this version
-
5.7.126 Dec 2024Nothing published for this version
-
5.7.027 Nov 2024Nothing published for this version
-
5.7.0+103 Dec 2024Nothing published for this version
-
5.6.127 Oct 2024Nothing published for this version
-
5.6.025 Oct 2024Nothing published for this version
-
5.5.325 Oct 2024Nothing published for this version
-
5.5.219 Oct 2024Nothing published for this version
-
5.5.119 Oct 2024Release notes
Open source →- Change the type of the
MapfromStringtodynamicwhen converting bydartify. - Add more tests for the Map.
- Change the type of the
-
5.5.017 Oct 2024Release notes
Open source →- Able to create a
Mapfunction and use it as aWorkerinstead of using JSON.
- Able to create a
-
5.4.028 Sep 2024Release notes
Open source →- Set the max number of the queued computations.
- Control how a new computation is added and retrieved from the Queue.
- Compute a priority computation (promote a computation to the top of the Queue so it will be compute as soon as possible).
-
5.4.0-rc.425 Sep 2024 pre-releaseNothing published for this version
-
5.4.0-rc.325 Sep 2024 pre-releaseNothing published for this version
-
5.4.0-rc.225 Sep 2024 pre-releaseNothing published for this version
-
5.4.0-rc.125 Sep 2024 pre-releaseNothing published for this version
-
5.4.0-rc24 Sep 2024 pre-releaseNothing published for this version
-
5.3.020 Sep 2024Release notes
Open source →- Able to add options and flags directly into to Dart to Js Compiler.
- Able to print the debug logs for the dart to js compiler (only if the
--debugflag is specified).