Skip to content

Commit 00b27cd

Browse files
committed
README refinements
1 parent 1c61238 commit 00b27cd

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<h2 align="middle">Data Oriented Slim Queue</h2>
22

3-
The `SlimQueue` class implements an in-memory queue with a basic API, targeting pure use cases like task queues, breadth-first search (BFS), and similar scenarios.
3+
The `SlimQueue` class implements an in-memory queue with a basic API, targeting pure FIFO use cases such as task queues, breadth-first search (BFS), and similar scenarios.
44

55
## Data-Oriented Design
66

@@ -44,6 +44,8 @@ import { SlimQueue } from 'data-oriented-slim-queue';
4444

4545
type RateLimiterTask<T> = () => Promise<T>;
4646

47+
class RateLimiterThrottlingError extends Error { /* ... */ }
48+
4749
class RateLimiter<T> {
4850
// Monotonic queue of ascending task-execution timestamps.
4951
private readonly _ascWindowTimestamps = new SlimQueue<number>();
@@ -55,7 +57,7 @@ class RateLimiter<T> {
5557
// ...
5658
}
5759

58-
public async tryExecutingTask(task: RateLimiterTask): Promise<T> {
60+
public async tryExecutingTask(task: RateLimiterTask<T>): Promise<T> {
5961
// Evict out-of-window past execution timestamps.
6062
const absoluteNow: number = Date.now();
6163
while (

0 commit comments

Comments
 (0)