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();