schedulers
1.0.1, released 4 years ago by revercode.com
Dart library for running asynchronous functions on time with interval, rate, parallel, and lazy controls.
WASM-ready
What it does
Provides various scheduling mechanisms like IntervalScheduler, RateScheduler, ParallelScheduler, TimeScheduler, and LazyScheduler to manage asynchronous task execution over time. It helps with load balancing, rate limiting, and lazy execution, returning a Future for task results.
AI-written summary of version 1.0.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to limit the rate of API requests or actions over time.
- You want to control concurrency by limiting parallel running asynchronous tasks.
- You need lazy execution where only the latest rapid-fire task is eventually executed.
Skip it when
- You require complex reactive stream transformations (where standard Dart async or RxDart might be more suitable).
- You are working with Dart SDK versions below 2.18.
Strengths
- Offers multiple specialized schedulers (Interval, Rate, Parallel, Time, Lazy).
- Allows awaiting results of scheduled tasks via standard Futures.
- Simple and lightweight with minimal dependencies.
Weaknesses
- Limited built-in documentation and categories.
- No advanced scheduling features outside the described classes.
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 2
final scheduler = RateScheduler(3, Duration(seconds: 1));
scheduler.run(() => download('pageA'));Alternatives
Packages that do the same job and could replace schedulers.