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

outdatedDart 1 only

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.

This is an alternative implementation of the Dart team's pool library.

Usage #

A simple usage example:

import 'dart:async';

import 'package:executor/executor.dart';

Future main() async {
  Executor executor = new Executor(concurrency: 10);
  // only 10 of them will be running at a time
  for (int i = 0; i < 20; i++) {
     executor.scheduleTask(() async {
       // await longDatabaseTask()
       // await anotherProcessing()
     });
  }
}
29
likes
30
points
56.2k
downloads

Publisher

verified publisheragilord.com

Weekly Downloads

Executes async tasks with a configurable maximum concurrency and rate.

Repository (GitHub)

License

BSD-3-Clause (license)

More

Packages that depend on executor