Search packages, repositories and app categories

Package detailsv2.2.5

executor

Executes async tasks with a configurable maximum concurrency and rate.

AndroidiOSWebmacOSWindowsLinux
30-day downloads
8.4K
Likes
33
Pub points
160

Install package

flutter pub add executor

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

The executor package enables the execution of asynchronous tasks with configurable maximum concurrency and rate limiting. It provides a simple, reliable way to manage concurrent operations, ensuring that no more than a specified number of tasks run simultaneously and that they are executed at a controlled rate. Ideal for managing API calls, file processing, or any scenario requiring controlled parallelism, it helps prevent resource exhaustion and improves performance stability. The package is lightweight and compatible across all major platforms supported by Flutter.

Use cases

  • Managing concurrent API requests
  • Limiting execution rate for external services
  • Processing large data sets in batches
  • Avoiding overload in network-heavy apps
  • Scheduling background tasks with control
  • Optimizing resource usage in I/O operations

Key features

  • Configurable maximum concurrency
  • Rate limiting support
  • Simple async task management
  • Cross-platform compatibility
  • Lightweight and efficient
  • Built-in error handling

Suitable for

  • Developers needing fine-grained control over async execution
  • Apps with high-volume or sensitive I/O operations
  • Teams implementing robust background processing
  • Projects requiring predictable performance under load
  • Flutter apps targeting multiple platforms

Considerations

  • Requires understanding of async programming
  • May need tuning for optimal concurrency settings
  • Not suitable for single-shot, non-repeating tasks
  • Best used with clear task isolation
  • Performance depends on configuration choices

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

Async task executor for Dart

Executes async tasks with a configurable maximum concurrency and rate.

Usage

A simple usage example:

final executor = Executor(concurrency: 10);
// only 10 of them will be running at a time
for (var i = 0; i < 20; i++) {
  // ignore: unawaited_futures
  executor.scheduleTask(() async {
    // await longDatabaseTask()
    // await anotherProcessing()
  });
}
await executor.join(withWaiting: true);
await executor.close();

Links

Categories

Dependencies

Dependency list 1 items

Source repository

Projects using this package