v2.2.5
executor
Executes async tasks with a configurable maximum concurrency and rate.
33Likes 18.1K30-day downloads160Pub points
AndroidiOSWebmacOSWindowsLinux
Async task executor for Dart
>=1.9.0 <2.0.0^5.0.0^1.3.0English project snapshot. Visit GitHub for the latest content.
Executes async tasks with a configurable maximum concurrency and rate.
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();