v2.2.5
executor
Führt asynchrone Aufgaben mit einer konfigurierbaren maximalen Konkurrenz und Rate aus.
33Likes 18.10030-Tage-Downloads160Pub-Punkte
AndroidiOSWebmacOSWindowsLinux
Asynchroner Task-Executor für Dart
>=1.9.0 <2.0.0^5.0.0^1.3.0Englischer Projektschnappschuss. Aktuelle Inhalte auf GitHub.
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();