Skip to content
pubscout

executor

2.2.5, released 2 years ago by agilord.com

Executes async tasks with a configurable maximum concurrency and rate.

WASM-ready
$ flutter pub add executor
Source repository

What it does

Executes asynchronous tasks while strictly respecting a configurable maximum concurrency limit and rate. Provides methods for scheduling tasks, tracking running or waiting counts, and joining execution blocks.

AI-written summary of version 2.2.5, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to limit concurrent asynchronous operations like network requests or database writes.
  • You want to control the execution rate of a batch of asynchronous tasks.

Skip it when

  • You are looking for the Dart team's pool library and prefer that specific ecosystem alternative.
  • You do not have any concurrency or rate-limiting requirements for your async tasks.

Strengths

  • Configurable maximum concurrency and rate.
  • Supports joining execution with waiting options.
  • Preserves caller stacktraces when tasks fail.

Weaknesses

  • Limited feature set beyond basic async scheduling and rate control.

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
1
final executor = Executor(concurrency: 10);
for (var i = 0; i < 20; i++) {
  executor.scheduleTask(() async {
    // your async task here
  });
}
await executor.join(withWaiting: true);
await executor.close();

Alternatives

Packages that do the same job and could replace executor.

  • async

    Offers general asynchronous tools and utilities maintained directly by the Dart team.

Works with

Packages commonly used together with executor: ones it builds on, ones built on it, and its own family.