https://github.com/agilord/executor
Async task executor for Dart
https://github.com/agilord/executor
Last synced: 3 months ago
JSON representation
Async task executor for Dart
- Host: GitHub
- URL: https://github.com/agilord/executor
- Owner: agilord
- License: bsd-3-clause
- Created: 2016-12-27T19:18:06.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-09-23T21:05:55.000Z (10 months ago)
- Last Synced: 2025-04-12T20:52:25.617Z (3 months ago)
- Language: Dart
- Size: 39.1 KB
- Stars: 16
- Watchers: 1
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Async task executor for Dart
Executes async tasks with a configurable maximum concurrency and rate.
## Usage
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();## Links
- [source code][source]
- contributors: [Agilord][agilord]
- Related projects:
- Alternative: the Dart team's [pool](https://pub.dev/packages/pool) library.
- PostgreSQL connection pool: [postgres_pool](https://pub.dev/packages/postgres_pool).[source]: https://github.com/agilord/executor
[agilord]: https://www.agilord.com/