executor 2.2.4 copy "executor: ^2.2.4" to clipboard
executor: ^2.2.4 copied to clipboard

Executes async tasks with a configurable maximum concurrency and rate.

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();
27
likes
160
points
24k
downloads

Publisher

verified publisheragilord.com

Weekly Downloads

Executes async tasks with a configurable maximum concurrency and rate.

Repository (GitHub)
View/report issues

Topics

#concurrency #parallelism #execution #async #rate-limit

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

stack_trace

More

Packages that depend on executor