Skip to content

Commit

Permalink
Added install section to README
Browse files Browse the repository at this point in the history
  • Loading branch information
fritzy committed May 1, 2011
1 parent 337efcf commit 5000187
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ Could I have done this with another synchronous library? Maybe, but I found this

**The biggest advantage is that functions that do not use your lock will be uninterrupted by your locked callback.** That is, you may have a lot of events and functions executing during your lock, but so long as you use your lock selectively, node.js will not wait on your lock release to run unrelated code. This is significantly different to some (maybe all?) of the synchronous libs from node.js, and should keep your service running very quickly dispite waiting on callbacks semi-synchronously.

##Install

npm install padlock

## Examples

### Out of Order
Expand Down Expand Up @@ -61,10 +65,7 @@ Could I have done this with another synchronous library? Maybe, but I found this
}, 200]);
logit("c");

lock.runwithlock(function() {
console.log("the end!");
lock.release();
});
logit("the end!");

> a
> b
Expand Down

0 comments on commit 5000187

Please sign in to comment.