From 7543a6fe8e42ab6c4098cd7ac2f43e95c02a2a7f Mon Sep 17 00:00:00 2001 From: Richard Moore Date: Wed, 24 Feb 2016 00:12:49 -0500 Subject: [PATCH] Added install info to readme. --- README.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9a6e8da..523176a 100644 --- a/README.md +++ b/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. @@ -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 ----------------