Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/agilord/executor
Async task executor for Dart
https://github.com/agilord/executor
Last synced: 2 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 (about 8 years ago)
- Default Branch: master
- Last Pushed: 2023-04-03T07:26:19.000Z (almost 2 years ago)
- Last Synced: 2024-03-25T21:33:18.949Z (10 months ago)
- Language: Dart
- Size: 41 KB
- Stars: 15
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
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/