Skip to content

Commit

Permalink
Added install info to readme.
Browse files Browse the repository at this point in the history
  • Loading branch information
ricmoo committed Feb 24, 2016
1 parent d1c1825 commit 7543a6f
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion README.md
@@ -1,7 +1,7 @@
Promise Rationing
=================

Promises are quite useful, but `Promise.all()` executes all promises in parallel, which is fine most of the time, but sometimes there are scarce resources that need to rationed (such as file descriptors, database connections, et cetera).
Promises are quite useful, but `Promise.all()` executes all promises in parallel, which is fine a lot of the time, but sometimes there are scarce resources that need to rationed (such as file descriptors, database connections, et cetera).

The `promise-rationing` library provides a familiar API to execute promise-compatible functions as promises, while limiting the number of concurrent functions running.

Expand All @@ -13,6 +13,15 @@ The returned object from `.all()` is a completely bona fide `Promise`, which can

**NOTE:** Why must we pass in a function and not a promise? Once a promise is created it begins executing immediately, which is what is trying to be prevented.


Install
-------

```
npm install promise-rationing
```


Example: Waiters
----------------

Expand Down

0 comments on commit 7543a6f

Please sign in to comment.