Skip to content

Commit

Permalink
Fix README
Browse files Browse the repository at this point in the history
  • Loading branch information
udoprog committed May 12, 2023
1 parent 3dda8f3 commit 646d72c
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,17 @@ Since this crate uses timing facilities from tokio it has to be used within
a Tokio runtime with the [`time` feature] enabled.

This library has some neat features, which includes:
* Not requiring a background thread or task to *drip*. Instead, one of the
waiting tasks assumes the duty as coordinator called the *core*. See below
for more details.
* Dropped tasks releases their partially acquired tokens.

**Not requiring a background task**. This is usually needed by token bucket
rate limiters to drive progress. Instead, one of the waiting tasks
temporarily assumes the role as coordinator (called the *core*). This
reduces the amount of tasks needing to sleep, which can be a source of
jitter for imprecise sleeping implementations and tight limiters. See below
for more details.

**Dropped tasks** release any resources they've reserved. So that
constructing and cancellaing asynchronous tasks to not end up taking up wait
slots it never uses which would be the case for cell-based rate limiters.

<br>

Expand Down

0 comments on commit 646d72c

Please sign in to comment.