Skip to content

Commit

Permalink
release
Browse files Browse the repository at this point in the history
  • Loading branch information
rtmigo committed Apr 17, 2021
1 parent 532a972 commit 548c2be
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# 0.1.0+0-alpha
# 0.1.0+1-alpha

- Initial release
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

# schedulers

A library for running asynchronous functions on time. This can be used for
Dart library for running asynchronous functions on time. Useful for
load balancing, rate limiting, lazy execution.

*In the examples below, all the `run(callback)` calls are performed right
Expand Down
2 changes: 2 additions & 0 deletions lib/src/50_interval.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ class IntervalScheduler implements PriorityScheduler {

Future<void> get completed => this._completer.future;

/// Notifies the scheduler that it should run the callback sometime. The actual call will occur
/// asynchronously at the time selected by the scheduler.
@override
Task<T> run<T>(GetterFunc<T> callback, [int priority = 0]) {
if (this._tasks.length <= 0) {
Expand Down
2 changes: 2 additions & 0 deletions lib/src/50_lazy.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ class LazyScheduler {

Unlimited _newestRunId = Unlimited();

/// Notifies the scheduler that it should run the callback sometime. The actual call will occur
/// asynchronously at the time selected by the scheduler.
void run(GetterFunc<void> callback) async {
this._callback = callback;

Expand Down
2 changes: 2 additions & 0 deletions lib/src/50_rateLimiting.dart
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ class RateScheduler implements PriorityScheduler {

final Queue<Stopwatch> _recentTimes = Queue<Stopwatch>();

/// Notifies the scheduler that it should run the callback sometime. The actual call will occur
/// asynchronously at the time selected by the scheduler.
@override
Task<T> run<T>(GetterFunc<T> callback, [int priority = 0]) {
Task<T>? result;
Expand Down
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: schedulers
description: Running callbacks asynchronously, with useful pauses between calls.
description: Dart library for running asynchronous functions on time. Useful for load balancing, rate limiting, lazy execution.
repository: https://github.com/rtmigo/schedulers

version: 0.1.0+0-alpha
version: 0.1.0+1-alpha

environment:
sdk: ">=2.12.0 <3.0.0"
Expand Down

0 comments on commit 548c2be

Please sign in to comment.