NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
pub.dev
pub.dev, #1837 most downloaded on pub.dev
Asynchronous tasks and parallel executors (similar to thread pools) for all Dart platforms (transparently), without having to deal with `Isolate` complexity.
Latest stable
1.2.0
Last release 18 days ago
04 Nov 2026
Ships unpredictably
gaps range from 2 weeks to 2.1 years
Nearly every release is documented
notes for 28 of 28 stable releases
Nothing withdrawn
no release was ever pulled
5 years old
28 releases · first in 2021
Drag across the ruler to compare, or tap a release to open it.
lib/src/async_task_isolate.dart:
lib/src/async_task_isolate.dart:
AsyncExecutor.execute while closing, once close is no longer waiting for executing tasks
(the Isolates are being closed), now throws an AsyncExecutorClosedError, as after close.
Previously, with no Isolate spawned yet, it failed with an IntegerDivisionByZeroException,
and otherwise the task was submitted to a closing Isolate (never completing).
A task executed while close waits for the executing tasks is still accepted (and waited for).AsyncExecutor.close also waits for the tasks executed while it was waiting for the executing tasks.Isolate (parameters that can't be sent between isolates,
or a SharedData serialization error) now completes with an AsyncExecutorError
(AsyncTask submit error). Previously it never completed and AsyncExecutor.close never returned.parameters() (or sharedData()) no longer prevents AsyncExecutor.close
from returning, and releases its channel port.lib/src/async_task_base.dart:
AsyncExecutor: a task executed before the executor is started, failing to be submitted,
now completes its Future with the error (was an unhandled error)._Isolate: releases the task channel port of a task failing before its execution
(for example, instantiate throwing in the Isolate), and the port of a task without a channel
in the Isolate (channelInstantiator returning null) but with a channel in the main side.Isolate now has its initTime and endTime (as with the generic executor).
They're still null if the task failed before its execution (resolving its SharedData or
instantiating it in the Isolate).lib/src/async_task_shared_data.dart:
SerializableData.copyGeneric: List, Set and Iterable copies keep the element type
(were copied with dynamic elements, failing the cast to a typed collection, like a List<Object>).SerializableData.copyGeneric: Map and MapEntry copies keep the key/value types when they are
basic types (String, int, double, num, bool, also nullable), Object or Object?/dynamic.
For other types (like Map<String, List<int>>) a StateError is thrown if the copy
(with the closest supported types) is not of the requested type.
A MapEntry with immutable key and value is returned as is.SerializableData.copyGeneric: supports null (also as a collection element).Tests:
async_task_isolate_integration_test.dart: execute while closing (with and without Isolates),
channel port leak of tasks failing to instantiate (via vm_service), execution times of failed tasks,
tasks with parameters that can't be sent to the Isolate or with throwing parameters().async_task_stress_test.dart: failed tasks in an Isolate have execution times
(the file was also re-formatted by dart format).async_task_shared_data_test.dart: typed collections copies.Your coding agent can read these notes before it upgrades. Set up the MCP server →
async_extension: ^1.2.24
lib/src/async_task_isolate.dart:
lib/src/async_task_isolate.dart:
_Isolate: an error while resolving a task's SharedData in the Isolate
(loadSharedData throwing or returning null, or a task type not registered)
now completes the task with an AsyncExecutorError.
Previously the error was unhandled in the Isolate port handler, killing the Isolate:
the task never completed and AsyncExecutor.close never returned._Isolate: a failed request of a missing SharedData (to the main side) no longer
leaves a stale pending request: the next task requests it again._Isolate: the task channel port is sent to the main side only after the task channel is initialized.
When the task execution was delayed by a SharedData request to the main side,
channel messages sent by the main side in the meantime were lost (the task waited forever)._Isolate: releases the task channel port of a task that failed resolving its SharedData.Tests:
async_task_stress_test.dart (VM and Web): hundreds of tasks with parallelism 0/1/4,
sequential and not, mixed sync/async/throwing tasks, results order and identity,
close while tasks are queued or running, execute while closing,
SharedData reuse and dispose across many tasks and bidirectional channel messages under load.async_task_isolate_integration_test.dart (VM): SharedData load failures and
the request of a missing SharedData from the main side, dispose between queued tasks,
concurrent tasks with new SharedData and Isolate termination on close (via vm_service).async_task_counter_test.dart: replaced the wall-clock assertions (execution and total time thresholds)
with assertions on the ordering of the execution intervals (concurrent vs. sequential execution)._AsyncExecutorSingleThread.execute (used with parallelism: 0 and on the Web): marks the task as submitted immediately, as the Isolate executor does, s
lib/src/async_task_base.dart:
_AsyncExecutorSingleThread.execute (used with parallelism: 0 and on the Web): marks the task as submitted immediately,
as the Isolate executor does, so a repeated AsyncExecutor.execute of the same task no longer executes it twice.AsyncTask: a throwing OnFinishAsyncTask trigger now logs its own error (was logging the task error).lib/src/async_task_shared_data.dart:
SerializableData.copyGeneric: fixed Int16List and Float64List copies (were creating an Int8List/Float32List and failing).SerializableData.copyGeneric, serializeGeneric, deserializeGeneric: MapEntry now keeps its value (the key was used for both).SerializableData.deserializeGeneric: dynamic/Object types return the value as is,
allowing the deserialization of untyped List, Set, Iterable and MapEntry elements.lib/src/async_task_extension.dart:
ListDoubleExtension.toFloat64x2List: fixed index computation (was failing for lists with more than 2 values).lib/src/async_task_shared_pointer.dart:
SharedPointerAddress.serialize: fixed the order of the serialized fields, matching deserialize.lib/src/async_task_channel.dart:
AsyncTaskChannel constructor: uses a private initializing formal (the named parameter is still messageHandler).Removed library names (library;) and fixed dartdoc references.
dart format with the Dart 3.13 style.
Tests:
async_task_executor_test.dart (VM and Web), async_task_isolate_test.dart (VM) and async_task_shared_data_test.dart.pubspec.yaml:
^3.13.0.async_extension to ^1.2.23ffi to ^2.2.0lints to ^6.1.0test to ^1.33.0dependency_validator to ^5.1.0coverage to ^1.16.0vm_service to ^15.4.0.github/workflows/dart.yml:
actions/checkout@v7.codecov/codecov-action@v7.lib/src/async_task_isolate.dart:
lib/src/async_task_isolate.dart:
_Isolate class _handleMessage method: removed default case that threw StateError on unhandled messages (not needed in Dart 3.6+).pubspec.yaml:
>=3.6.0 <4.0.0.collection to ^1.19.1async_extension to ^1.2.20ffi to ^2.1.5test to ^1.29.0coverage to ^1.15.0- Optimize AsyncTaskLoggerCaller: - Avoid String build when logging is disabled. - Optimize async_task_isolate.dart: - Improve message objects, to all
Merge v1.1.1 - Optimize
- Optimize `AsyncTaskLoggerCaller`:
- Avoid `String` build when logging is disabled.
- Optimize `async_task_isolate.dart`:
- Improve message objects, to allow immutable detection.
- `AsyncTask`:
- Improve error handling and error response from `Isolate`.
- sdk: '>=3.2.0 <4.0.0'
- async_extension: ^1.2.5
- lints: ^3.0.0
- test: ^1.24.9
- dependency_validator: ^3.2.3
- coverage: ^1.7.1
- vm_service: ^13.0.0
- sdk: '>=3.0.0 <4.0.0' - collection: ^1.18.0 - async_extension: ^1.2.4 - ffi: ^2.1.0 - lints: ^2.1.1 - test: ^1.24.6 - coverage: ^1.6.3 - vm_service:
sdk: '>=3.0.0 <4.0.0'
collection: ^1.18.0
async_extension: ^1.2.4
ffi: ^2.1.0
lints: ^2.1.1
test: ^1.24.6
coverage: ^1.6.3
vm_service: ^11.9.0
- README.md: - Fix GitHub CI badge. - Added parallelism explanation. - test: ^1.22.1
Merge v1.0.20
- `README.md`:
- Fix GitHub CI badge.
- Added `parallelism` explanation.
- test: ^1.22.1
- Update GitHub CI. - Added tests in chrome. - sdk: '>=2.17.0 <3.0.0' - collection: ^1.17.0 - async_extension: ^1.0.12 - ffi: ^2.0.1 - lints: ^2.0.1 -
Merge v1.0.19
- Update GitHub CI.
- Added tests in chrome.
- sdk: '>=2.17.0 <3.0.0'
- collection: ^1.17.0
- async_extension: ^1.0.12
- ffi: ^2.0.1
- lints: ^2.0.1
- test: ^1.22.0
- dependency_validator: ^3.2.2
- coverage: ^1.6.1
- vm_service: ^9.4.0
- AsyncExecutor: - Added field name (for debug purposes). - Now detects Isolate starting timeout.
v1.0.18
- `AsyncExecutor`:
- Added field `name` (for debug purposes).
- Now detects Isolate starting timeout.
- New AsyncExecutorThreadInfo and AsyncThreadInfo. - Improved AsyncTaskChannel close behavior. - Reduced allocation of closures and Futures to improve
v1.0.17
- New `AsyncExecutorThreadInfo` and `AsyncThreadInfo`.
- Improved `AsyncTaskChannel` close behavior.
- Reduced allocation of closures and `Future`s to improve GC performance.
- `AsyncTask`:
- Added trigger list `addOnFinishAsyncTask`, to avoid `Future`s.
- SharedPointerBytes: - Expose bytesand byteData.
v1.0.16
- `SharedPointerBytes`:
- Expose `bytes`and `byteData`.
- Added SharedPointer: shared a memory aread between Isolates. - ffi: ^1.1.2
v1.0.15
- Added `SharedPointer`: shared a memory aread between `Isolate`s.
- ffi: ^1.1.2
SharedPointer: shared memory area between Isolates.- Fix issue when reusing _ReceivePort. - Optimize imports.
v1.0.14
- Fix issue when reusing `_ReceivePort`.
- Optimize imports.
- AsyncTaskChannel: - Added id to help debugging. - Added non-blocking readMessage. - Added messageQueueLength and messageQueueIsEmpty. - AsyncTaskCha
v1.0.13
- `AsyncTaskChannel`:
- Added `id` to help debugging.
- Added non-blocking `readMessage`.
- Added `messageQueueLength` and `messageQueueIsEmpty`.
- `AsyncTaskChannelPort`:
- Added `id` to help debugging.
- Added `readSync` and `messageQueueLength`.
- Fixed issue executing tasks in a not start `AsyncExecutor` that is sequencial.
- async_extension: ^1.0.9
- test: ^1.19.5
- dependency_validator: ^3.1.2
Migrate from pedantic to lints.
pedantic to lints.Only export async_extension on library async_task_extension.dart.
async_extension on library async_task_extension.dart.Optimize async methods with async_extension.
async methods with async_extension.Ensure that all ports are closed after close executors.
README.md:
IterableFutureOrExtension and IterableFutureExtension to
package async_extension.
Fix isolate message of a task without SharedData.
SharedData.- Small fix in README. - Small fix in example.
Added AsyncTaskChannel for messages communication with tasks during execution.
AsyncTaskChannel for messages communication with tasks during execution.AsyncExecutorStatus.AsyncExecutor: optimize to avoid creating of futures while executing/processing a task.Added AsyncTaskPlatform and AsyncTaskPlatformType.
AsyncTaskPlatform and AsyncTaskPlatformType.AsyncTask:
taskTypeexecute to use less async operations.AsyncExecutorSharedDataInfo to report SharedData information.AsyncExecutor:
parallelismPercentage.execute, executeAll and executeAllAndWaitResults to dispatch less asyn operations.disposeSharedData and disposeSharedDataInfo.IterableFutureOrExtension and IterableFutureExtension._AsyncExecutorMultiThread:
async operations._RawReceivePortPool to optimize ports.SharedData._RawReceivePortPool: pool of reusable _ReceivePort._ReceivePort: an optimized RawReceivePort.Allow multiple SharedData: Optional method sharedData now returns a Map .
AsyncTask:
SharedData: Optional method sharedData
now returns a Map<String,SharedData>.Fix close operation while tasks are being executed.
AsyncExecutor:
close operation while tasks are being executed.Added SharedData, to optimize data sharing between tasks and threads/isolates.
SharedData, to optimize data sharing between
tasks and threads/isolates.AsyncExecutor: added close to stop and finalize an executor.ListExtension, MapExtension, SetExtension, IterableExtension.Fix pubspec.yaml description length.
pubspec.yaml description length.README.md description.Implemented AsyncTask with status, result and executionTime.
AsyncTask with status, result and executionTime.AsyncExecutor with implementations based on dart:isolate and dart:async.One column per quarter.