v2.2.5
executor
最大並行性とレートを設定可能な非同期タスクを実行します。
33いいね 1.8万30日間ダウンロード160Pub ポイント
AndroidiOSWebmacOSWindowsLinux
Dart用の非同期タスク実行者
>=1.9.0 <2.0.0^5.0.0^1.3.0以下は英語原文のスナップショットです。最新版は 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();