NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
pub.dev · #2100 most downloaded on pub.dev
Multithreading and worker thread pool for Dart / Flutter, to offload CPU-bound and heavy I/O tasks to Isolate or Web Worker threads.
Last release 16 days ago
22 Sep 2026
Release timing varies
gaps range from 9 days to 6 months
Nearly every release is documented
notes for 55 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
5 years old
68 releases · first in 2021
One column per quarter.
Fix WASM loader in test console
Fix WASM loader in test console
squadron-worker, squadron-marshaling, and squadron-cancelation) for AI agents.exclude doc images from package
exclude doc images from package
send() optimization: for non-cancellable tasks, synchronously return the future when the channel is already up and running. Otherwise, return the resu
send() optimization: for non-cancellable tasks, synchronously return the future when the channel is already up and running. Otherwise, return the result asynchronously via ForwardCompleter.Stopwatch instead of Timestamp for worker stats.Add Squadron.disableBrowserCache to force browsers into reloading the code of Workers. When set to true, Squadron will append a query parameter to the
Squadron.disableBrowserCache to force browsers into reloading the code of Workers. When set to true, Squadron will append a query parameter to the Worker URL, passing a random number that should prevent browsers from using the cache.version parameter to SquadronService annotation. This parameter is used by squadron_builder to include the version as a query parameter in the generated Worker URI. See also https://github.com/d-markey/squadron_builder/issues/40.Deprecate localWorker in favor of sharedService and LocalWorkerClient in favor of WorkerClient. See squadron_builder and https://github.com/d-markey/s…
localWorker in favor of sharedService and LocalWorkerClient in favor of WorkerClient. See squadron_builder and https://github.com/d-markey/squadron/issues/75.Channel.closed, which returns a Future<void> that completes when the channel is closed. This is the same future as the one returned by Channel.close().Support sending Dart DateTime / JS Date instances to/from Workers.
DateTime / JS Date instances to/from Workers.Fixes a memory leak on native platforms
Fixes a memory leak on native platforms
ForwardStreamController on VM to avoid memory leaks. Fixes https://github.com/d-markey/squadron/issues/70.- Fix warnings from pub.dev.
Update local logger example
Update local logger example
_schedule synchronous method was systematically called and would block the event loop. This version uses a timer to avoid flooding the pool's scheduler.Display download badge in readme
Display download badge in readme
WorkerStat.status.ConcurrencySettings properties in WorkerPool.Implement serialization contexts to ser-/deser-ialize while retaining object identities. For instance, when calling a service method myServiceMethod(x
myServiceMethod(x, x), previous versions of Squadron would serialize x twice, resuling in two different instances on the receiving end. Using ContextAwareConverter, x can be serialized only once and the same serialized representation of x would be used for the second argument. Note that this also supports serialization of graph of objects, including those with cyclical references.WorkerService anymore.SquadronService.local() to indicate the service may run as a local service; localWorker to be applied on parameters used to pass a local service on to a worker (only supported for start requests); withContext parameter to SquadronMethod to force use of a marshaling context when ser-/deser-ializing to/from that service method.Implement jsify/dartify-like functions to handle conversion between Dart / JavaScript. The implementation supports arbitrary Maps, Lists and Sets, as
jsify/dartify-like functions to handle conversion between Dart / JavaScript. The implementation supports arbitrary Maps, Lists and Sets, as well as BigInts.Fix IWorker.terminate() to make sure worker termination is really immediate.
IWorker.terminate() to make sure worker termination is really immediate.Fix a bug where streaming operations in workers are not cancelled if the worker has been stopped before the subscription is cancelled.
Add IWorker.terminate() to enable immediate termination of workers and worker pools.
IWorker.terminate() to enable immediate termination of workers and worker pools.Handle weird case where int is received as JSString when worker was compiled to Web Assembly. Fixes https://github.com/d-markey/squadron_builder/issue
int is received as JSString when worker was compiled to Web Assembly. Fixes https://github.com/d-markey/squadron_builder/issues/23.Remove DirectCastConverter and use CastConverter instead. Fixes https://github.com/d-markey/squadron_builder/issues/22.
DirectCastConverter and use CastConverter instead. Fixes https://github.com/d-markey/squadron_builder/issues/22.Converter.td<T>() for handling typed data. Instead, conversion should be based on TypedDataMarshaler<T>, combined with Squadron.converter when necessary (eg. when the typed data list is nested in a map / list).Squadron.converter should be modifiable but it was declared final: implement getter and setter.
Squadron.converter should be modifiable but it was declared final: implement getter and setter.Squadron.onConverterChanged() to be notified after the converter has been updated.Implement specific marshaler for TypedData (used by squadron_builder >= 6.1.0).
TypedData (used by squadron_builder >= 6.1.0).Breaking change: the connection channel is provided to caller before the service is installed (when the service is mixed in with ServiceInstaller); if…
ServiceInstaller); if service installation fails, the channel is closed and the caller is notified with an error and an endOfStream response.token type to CancelationToken in LocalWorkerClient.send().add direct cast converter for native platforms
add direct cast converter for native platforms
- Update documentation.
Fix wasm compatibility issues reported by pub.dev.
Merged worker_monitor into worker_runner.
worker_monitor into worker_runner.SerializeWith annotation.package:cancelation_token.package:logger for logging.send() and stream() are no longer generic: they return Future<dynamic> and Stream<dynamic>. It is now the user responsibility to ensure service arguments and return values are properly handled in terms of Dart type. One major caveat comes from Web Assembly, where Dart int values sent from one side are received as Dart double values on the other side. To help with conversions, Squadron provides converters and selects the proper converter depending on the runtime platform, so you can "cast" values on either side of the service call (see Squadron.converters in squadron_singleton.dart). The recommendation is to use squadron_builder to generate the code for your workers -- it will take care of casting and marshaling.Reworked exception deserializer management to protect from multiple registrations and allow for deregistration. See https://github.com/d-markey/squadr
ServiceInstaller and provide one or both of install() / uninstall(). These methods will be called on platform thread setup/teardown. See https://github.com/d-markey/squadron/issues/29#issuecomment-1719682340.Removed stdout_logger.dart because it imports dart:io which made pub.dev revoke the support for Web platforms.
stdout_logger.dart because it imports dart:io which made pub.dev revoke the support for Web platforms.BREAKING CHANGE: Removed squadron_service.dart, squadron_worker.dart and squadron_local_worker.dart libraries: import only squadron.dart instead.
squadron_service.dart, squadron_worker.dart and squadron_local_worker.dart libraries: import only squadron.dart instead.Automated test coverage report
Automated test coverage report
Fix 'marshal' typo -- provide a compatibility layer to mark as deprecated all versions using '*marshall*' and mark these artefacts as deprecated. They…
PlatformWorkerHook and EntryPoint aliases now return FutureOr<void>.Use DateTime.now().toUtc() instead of DartTime.timestamp() which is available starting from Dart 3 only. Fixes https://github.com/d-markey/squadron/is
DateTime.now().toUtc() instead of DartTime.timestamp() which is available starting from Dart 3 only. Fixes https://github.com/d-markey/squadron/issues/22.Replace previous WorkerRequest and WorkerResponse implementations with extension methods. This may be a breaking change.
WorkerRequest and WorkerResponse aliases of List to minimize serialization overhead. Replace previous WorkerRequest and WorkerResponse implementations with extension methods. This may be a breaking change.EntryPoint and PlatformWorker typedefs to enforce type safety across runtime platforms. EntryPoint and PlatformWorker should both resolve to dynamic in the IDE. At compile time, they should resolve to the concrete types according to the platform (ie. String and Worker from dart:html for Web platforms, FutureOr<void> Function(List) and Isolate on native platforms). This should help prevent issues such as https://github.com/d-markey/squadron/issues/17.Breaking change: use List instead of Map for serialization of worker request/response.
List instead of Map for serialization of worker request/response.Downgrade meta version to ^1.8.0 to match flutter_test requirements (fix for https://github.com/d-markey/squadron/issues/18).
meta version to ^1.8.0 to match flutter_test requirements (fix for https://github.com/d-markey/squadron/issues/18).Ensure uniqueness of cancellation token IDs across workers (breaking change for classes implementing/deriving from CancellationToken: id is now a Stri…
CancellationToken: id is now a String).Downgrade meta version to ^1.8.0 to match flutter_test requirements.
meta version to ^1.8.0 to match flutter_test requirements.Add UseLogger annotation to have package squadron_builder generate the associated code in worker threads.
UseLogger annotation to have package squadron_builder generate the associated code in worker threads.Add notifications when a worker is added or removed. Interested components can register listeners (callbacks) for these notifications.
Rename SquadronSerializer to SquadronMarshaller.
SquadronSerializer to SquadronMarshaller.WorkerResponse: if result is an Iterable but not a List, call toList() to get results before serializing the response back to the caller.
WorkerResponse: if result is an Iterable but not a List, call toList() to get results before serializing the response back to the caller.SerializeWith: annotation used to indicate how to marshal data to/from a service running in a Worker. See also SquadronSerializer class.CancellationToken: provide Future isCancelled({bool throwIfCancelled = false}) to make it easier to check cancellation token status in worker services
CancellationToken: provide Future<bool> isCancelled({bool throwIfCancelled = false}) to make it easier to check cancellation token status in worker services.ValueWrapper: check future hasn't already completed before calling complete() or completeError().
ValueWrapper: check future hasn't already completed before calling complete() or completeError().Squadron annotations to support code generation for workers, worker p…
Squadron annotations to support code generation for workers, worker p…
Now with annotations to support code generation. To be used with package squadron-builder.
squadron-builder.Breaking changes : all deprecated artefacts have been removed.
LocalSquadronLogger has been deleted.args and token arguments of methods send() and stream() are now named argument.id parameter that was passed to Worker constructors._JsChannels to identify objects whose ownership must be transfered to the receiving end (the transfer argument in postMessage). However most of the time, the request / response objects are usually made of List, Map, and base types, all of which can cross thread boundaries "as-is". This behavior is now controlled by optional parameters inspectRequest and inspectResponse of methods Worker.execute() and Worker.stream(), defaulting to false thus disabling message inspection. Passing true will activate message inspection for request and/or response and will be necessary when the message contains an object whose ownership must be transfered to the receiving end, typicaly a MessagePort. Basic testing found message transfer time improvement around ~5-10% for large payloads, e.g. a List containing many Map items (note that in Web scenarios, JSON serialization could prove a more efficient alternative). It should have little to no effect on smaller messages. Start requests will always be processed with inspectRequest = true and inspectResponse = true.ReceivePorts are closed upon Isolate termination.LocalSquadronLogger obsolete).Rewritten streaming implementations (fix for https://github.com/d-markey/squadron/issues/8).
Implemented a LocalLogger to have Web workers log messages from the main window (effectively logging via Dart debugger if present).
LocalLogger to have Web workers log messages from the main window (effectively logging via Dart debugger if present).dart:isolate from _worker_runner.dart.coverage a dev dependency.Fixed streaming from LocalWorker.
LocalWorker.LocalWorker.Implemented LocalWorker, a worker-like class living in the same thread as its owner and available for inter-worker messaging. For instance, in a Flutt
LocalWorker, a worker-like class living in the same thread as its owner and available for inter-worker messaging. For instance, in a Flutter app, instantiating a LocalWorker in the main thread enables other workers to (indirectly) call Flutter APIs that are otherwise not available in the context of a secondary thread.LocalWorker uses the same concepts and approach as Workers, such as the operations map and the WorkerService interface.Document types and release mode (special thanks to SwissCheese5).
Document the new logging feature.
sendRequest() async in browser Channel (implementation closer to that of native Channel).WorkerException.Added a logging mechanism to facilitate debugging Squadron's internals.
Nothing published for this version
Nothing published for this version
Implemented cancellation token to enable worker task notification that cancellation has occured.
TimeOutToken, CancellableToken and CompositeToken.README.md.Nothing published for this version
Nothing published for this version
Nothing published for this version
Several minor changes (some possibly breaking changes but easy to fix).
squadron_service.dart (worker services only), squadron_worker.dart (worker services and workers without pool) vs. squadron.dart (worker services, workers and pools).Channel into Channel (used to send a WorkerRequest) and WorkerChannel (used to send a WorkerResponse).ConcurrencySettings to eventually replace minWorkers, maxWorkers and maxParallel.WorkerPool.execute() (will eventually replace WorkerPool.compute()).WorkerPool.scheduleTask() to schedule a ValueTask. Result will be accessible from future ValueTask.value.WorkerPool.scheduleStream() to schedule a StreamTask. Results will be accessible from stream StreamTask.stream.ValueTask and StreamTask provide information on task execution (eg. status, wait time, execution time...).WorkerPool.cancel() to support worker task cancellation.README.md.Split library into squadron_service.dart (worker services only), squadron.dart (worker services and workers without pool) vs. squadron_pool.dart (work
squadron_service.dart (worker services only), squadron.dart (worker services and workers without pool) vs. squadron_pool.dart (worker services, workers and pools).connect() and process() from Worker to WorkerService.run() function to facilitate implementation of platform workers.README.md.Single test code base for both platforms.
Your coding agent can read these notes before it upgrades. Set up the MCP server →